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.Object
Output 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.String
getName()
java.util.Collection<ValidationEvent>
getUnmatchedEvents()
boolean
isInvalid()
Checks if the result does not match expected results.java.lang.String
toString()
SmithyDiffTestCase.Result
unwrap()
Throws an exception if the result is invalid, otherwise returns the result.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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.
-
-