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 Summary
ConstructorsConstructorDescriptionConstructs a newdev.metaschema.model.testing.testsuite.TestScenarioinstance with no metadata.TestScenario(IMetaschemaData data) Constructs a newdev.metaschema.model.testing.testsuite.TestScenarioinstance with the specified metadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a newValidationCaseitem to the underlying collection.Get the generate Schema.Get additional Metaschema-related information for the object (i.e., resource location).getName()Get the name.Get the validation Case.booleanRemove the first matchingValidationCaseitem from the underlying collection.voidsetGenerateSchema(GenerateSchema value) Set the generate Schema.voidSet the name.voidsetValidationCases(List<ValidationCase> value) Set the validation Case.toString()
-
Constructor Details
-
TestScenario
public TestScenario()Constructs a newdev.metaschema.model.testing.testsuite.TestScenarioinstance with no metadata. -
TestScenario
Constructs a newdev.metaschema.model.testing.testsuite.TestScenarioinstance with the specified metadata.- Parameters:
data- the metaschema data, ornullif none
-
-
Method Details
-
getMetaschemaData
Description copied from interface:IBoundObjectGet additional Metaschema-related information for the object (i.e., resource location).- Specified by:
getMetaschemaDatain interfaceIBoundObject- Returns:
- the Metaschema-related information
-
getName
Get the name.The name of this test scenario.
- Returns:
- the name value
-
setName
Set the name.The name of this test scenario.
- Parameters:
value- the name value to set
-
getGenerateSchema
Get the generate Schema.Defines schema generation parameters and expected results.
- Returns:
- the generate-schema value, or
nullif not set
-
setGenerateSchema
Set the generate Schema.Defines schema generation parameters and expected results.
- Parameters:
value- the generate-schema value to set, ornullto clear
-
getValidationCases
Get the validation Case.A content validation test case.
- Returns:
- the validation-case value
-
setValidationCases
Set the validation Case.A content validation test case.
- Parameters:
value- the validation-case value to set
-
addValidationCase
Add a newValidationCaseitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeValidationCase
Remove the first matchingValidationCaseitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
toString
-