Class SmithyTestCase.Result

java.lang.Object
software.amazon.smithy.model.validation.testrunner.SmithyTestCase.Result
Enclosing class:
SmithyTestCase

public static final class SmithyTestCase.Result extends Object
Output of validating a model against a test case.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isInvalid

      public boolean isInvalid()
      Checks if the result does not match expected results.
      Returns:
      True if there are extra or unmatched events.
    • getModelLocation

      public String getModelLocation()
      Returns:
      Returns a description of where the model was stored.
    • getUnmatchedEvents

      public Collection<ValidationEvent> getUnmatchedEvents()
      Returns:
      Returns the events that were expected but not encountered.
    • getExtraEvents

      public Collection<ValidationEvent> getExtraEvents()
      Returns:
      Returns the events that were encountered but not expected.
    • unwrap

      public SmithyTestCase.Result unwrap()
      Throws an exception if the result is invalid, otherwise returns the result.
      Returns:
      Returns the result if it is ok.
      Throws:
      SmithyTestCase.Error - if the result contains invalid events.