Class SmithyDiffTestCase.Result
- java.lang.Object
-
- software.amazon.smithy.diff.testrunner.SmithyDiffTestCase.Result
-
- Enclosing class:
- SmithyDiffTestCase
public static final class SmithyDiffTestCase.Result extends java.lang.ObjectOutput of diffing a model against a test case.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<ValidationEvent>getExtraEvents()java.lang.StringgetName()java.util.Collection<ValidationEvent>getUnmatchedEvents()booleanisInvalid()Checks if the result does not match expected results.java.lang.StringtoString()SmithyDiffTestCase.Resultunwrap()Throws an exception if the result is invalid, otherwise returns the result.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getName
public java.lang.String getName()
- Returns:
- Returns the name of the test case.
-
getUnmatchedEvents
public java.util.Collection<ValidationEvent> getUnmatchedEvents()
- Returns:
- Returns the events that were expected but not encountered.
-
getExtraEvents
public java.util.Collection<ValidationEvent> getExtraEvents()
- Returns:
- Returns the events that were encountered but not expected.
-
isInvalid
public boolean isInvalid()
Checks if the result does not match expected results.- Returns:
- True if there are extra or unmatched events.
-
unwrap
public SmithyDiffTestCase.Result unwrap()
Throws an exception if the result is invalid, otherwise returns the result.- Returns:
- Returns the result if it is ok.
- Throws:
SmithyDiffTestCase.Error- if the result contains invalid events.
-
-