Class TestCollection

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

@MetaschemaAssembly(formalName="Test Collection", description="A collection of test scenarios located at a specific path.", name="test-collection", moduleClass=MetaschemaTestSuiteModule.class) public class TestCollection extends Object implements IBoundObject
A collection of test scenarios located at a specific path.
  • Constructor Details

    • TestCollection

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

      public TestCollection(IMetaschemaData data)
      Constructs a new dev.metaschema.model.testing.testsuite.TestCollection 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
    • getLocation

      @NonNull public URI getLocation()
      Get the location.

      A URI reference to the location of this test collection.

      Returns:
      the location value
    • setLocation

      public void setLocation(@NonNull URI value)
      Set the location.

      A URI reference to the location of this test collection.

      Parameters:
      value - the location value to set
    • getName

      @NonNull public String getName()
      Get the name.

      The name of this test collection.

      Returns:
      the name value
    • setName

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

      The name of this test collection.

      Parameters:
      value - the name value to set
    • getTestScenarios

      @NonNull public List<TestScenario> getTestScenarios()
      Get the test Scenario.

      A test scenario that validates a metaschema and its content.

      Returns:
      the test-scenario value
    • setTestScenarios

      public void setTestScenarios(@NonNull List<TestScenario> value)
      Set the test Scenario.

      A test scenario that validates a metaschema and its content.

      Parameters:
      value - the test-scenario value to set
    • addTestScenario

      public boolean addTestScenario(TestScenario item)
      Add a new TestScenario item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeTestScenario

      public boolean removeTestScenario(TestScenario item)
      Remove the first matching TestScenario 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