java.lang.Object
dev.metaschema.model.testing.testsuite.TestScenario
All Implemented Interfaces:
IBoundObject

@MetaschemaAssembly(formalName="Test Scenario", description="A test scenario that validates a metaschema and its content.", name="test-scenario", moduleClass=MetaschemaTestSuiteModule.class) public class TestScenario extends Object implements IBoundObject
A test scenario that validates a metaschema and its content.
  • Constructor Details

    • TestScenario

      public TestScenario()
      Constructs a new dev.metaschema.model.testing.testsuite.TestScenario instance with no metadata.
    • TestScenario

      public TestScenario(IMetaschemaData data)
      Constructs a new dev.metaschema.model.testing.testsuite.TestScenario instance with the specified metadata.
      Parameters:
      data - the metaschema data, or null if none
  • Method Details

    • getMetaschemaData

      public IMetaschemaData getMetaschemaData()
      Description copied from interface: IBoundObject
      Get additional Metaschema-related information for the object (i.e., resource location).
      Specified by:
      getMetaschemaData in interface IBoundObject
      Returns:
      the Metaschema-related information
    • getName

      @NonNull public String getName()
      Get the name.

      The name of this test scenario.

      Returns:
      the name value
    • setName

      public void setName(@NonNull String value)
      Set the name.

      The name of this test scenario.

      Parameters:
      value - the name value to set
    • getGenerateSchema

      @Nullable public GenerateSchema getGenerateSchema()
      Get the generate Schema.

      Defines schema generation parameters and expected results.

      Returns:
      the generate-schema value, or null if not set
    • setGenerateSchema

      public void setGenerateSchema(@Nullable GenerateSchema value)
      Set the generate Schema.

      Defines schema generation parameters and expected results.

      Parameters:
      value - the generate-schema value to set, or null to clear
    • getValidationCases

      @NonNull public List<ValidationCase> getValidationCases()
      Get the validation Case.

      A content validation test case.

      Returns:
      the validation-case value
    • setValidationCases

      public void setValidationCases(@NonNull List<ValidationCase> value)
      Set the validation Case.

      A content validation test case.

      Parameters:
      value - the validation-case value to set
    • addValidationCase

      public boolean addValidationCase(ValidationCase item)
      Add a new ValidationCase item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeValidationCase

      public boolean removeValidationCase(ValidationCase item)
      Remove the first matching ValidationCase item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object