Package de.bmiag.tapir.execution.model
Class TestClass
- java.lang.Object
-
- de.bmiag.tapir.execution.model.TestClass
-
- All Implemented Interfaces:
Documentable
,ExecutionModelElement
,Identifiable
,JavaClassBased
,NamedElement
,Parameterized
,StructuralElement
,Taggable
public final class TestClass extends java.lang.Object implements Parameterized, StructuralElement, Documentable, NamedElement, JavaClassBased, Identifiable
TestClass
represents a test class which contains steps to be executed.Caution:
steps
is annotated by@Modifiable
as it's not possible to pass the instance ofTestClass
to the steps in order to linkTestStep.parentTestClass
otherwise.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TestClass.Builder
Builds instances of typeTestClass
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TestClass
build(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<TestClass.Builder> init)
Creates an immutable instance of TestClass.TestClass
copy(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<TestClass.Builder> init)
Creates an immutable copy of this instance.boolean
equals(java.lang.Object obj)
java.util.Optional<java.lang.String>
getDescription()
Returns a description which is more detailed than the title.java.lang.Integer
getId()
Returns the id.java.util.List<java.lang.String>
getIssues()
Returns the associated issues of a bugtracking tooljava.lang.Class<?>
getJavaClass()
The underlying java class.java.lang.String
getName()
Returns the name.java.util.List<TestParameter>
getParameters()
Returns the parameters.StructuralElementContainer
getParent()
Returns the parentelement
.java.util.List<TestStep>
getSteps()
java.util.List<java.lang.String>
getTags()
Returns the associated tags.java.util.Optional<java.lang.String>
getTitle()
Returns the title.int
hashCode()
void
setSteps(java.util.List<TestStep> steps)
Sets the value of thesteps
attributejava.lang.String
toString()
-
-
-
Method Detail
-
getSteps
public java.util.List<TestStep> getSteps()
- Returns:
- The value of the
steps
attribute
-
setSteps
public void setSteps(java.util.List<TestStep> steps)
Sets the value of thesteps
attribute- Parameters:
steps
- the steps
-
getParameters
public java.util.List<TestParameter> getParameters()
Description copied from interface:Parameterized
Returns the parameters.- Specified by:
getParameters
in interfaceParameterized
- Returns:
- The value of the
parameters
attribute
-
getParent
public StructuralElementContainer getParent()
Description copied from interface:StructuralElement
Returns the parentelement
.- Specified by:
getParent
in interfaceStructuralElement
- Returns:
- The value of the
parent
attribute
-
getJavaClass
public java.lang.Class<?> getJavaClass()
Description copied from interface:JavaClassBased
The underlying java class.- Specified by:
getJavaClass
in interfaceJavaClassBased
- Returns:
- The value of the
javaClass
attribute
-
getTags
public java.util.List<java.lang.String> getTags()
Description copied from interface:Taggable
Returns the associated tags.
-
getIssues
public java.util.List<java.lang.String> getIssues()
Description copied from interface:Taggable
Returns the associated issues of a bugtracking tool
-
getTitle
public java.util.Optional<java.lang.String> getTitle()
Description copied from interface:Documentable
Returns the title. The title should be short like a headline.- Specified by:
getTitle
in interfaceDocumentable
- Returns:
- The value of the
title
attribute
-
getDescription
public java.util.Optional<java.lang.String> getDescription()
Description copied from interface:Documentable
Returns a description which is more detailed than the title.- Specified by:
getDescription
in interfaceDocumentable
- Returns:
- The value of the
description
attribute
-
getName
public java.lang.String getName()
Description copied from interface:NamedElement
Returns the name.- Specified by:
getName
in interfaceNamedElement
- Returns:
- The value of the
name
attribute
-
getId
public java.lang.Integer getId()
Description copied from interface:Identifiable
Returns the id. The id has to be unique in an execution plan.- Specified by:
getId
in interfaceIdentifiable
- Returns:
- The value of the
id
attribute
-
equals
@Pure public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
@Pure public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
@Pure public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
build
public static TestClass build(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<TestClass.Builder> init)
Creates an immutable instance of TestClass. The values can be initialized by using the init parameter.- Parameters:
init
- The initializer- Returns:
- An immutable TestClass instance
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
copy
public TestClass copy(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<TestClass.Builder> init)
Creates an immutable copy of this instance. Uses accessors to get values to initialize the new immutable instance. The values can be modified by using the init parameter.- Parameters:
init
- The initializer- Returns:
- A copied immutable TestClass instance
-
-