Package de.bmiag.tapir.execution.model
Class TestStep
- java.lang.Object
-
- de.bmiag.tapir.execution.model.TestStep
-
- All Implemented Interfaces:
Documentable
,ExecutionModelElement
,Identifiable
,JavaMethodBased
,NamedElement
,Parameterized
public final class TestStep extends java.lang.Object implements Parameterized, Documentable, NamedElement, JavaMethodBased, ExecutionModelElement, Identifiable
TestStep
represents a single test step. If a step is should be invoked multiple times with different parameters for each invocation aTestStep
instance exists.In
immutables
parentTestClass
is excluded fromequals(Object)
,hashCode()
andtoString()
in order to avoid infinite loops.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TestStep.Builder
Builds instances of typeTestStep
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TestStep
build(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<TestStep.Builder> init)
Creates an immutable instance of TestStep.TestStep
copy(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<TestStep.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.lang.reflect.Method
getJavaMethod()
The underlying java method.java.lang.String
getName()
Returns the name.java.util.List<TestParameter>
getParameters()
Returns the parameters.TestClass
getParentTestClass()
java.util.Optional<java.lang.String>
getTitle()
Returns the title.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getParentTestClass
public TestClass getParentTestClass()
- Returns:
- The value of the
parentTestClass
attribute
-
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
-
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
-
getJavaMethod
public java.lang.reflect.Method getJavaMethod()
Description copied from interface:JavaMethodBased
The underlying java method.- Specified by:
getJavaMethod
in interfaceJavaMethodBased
- Returns:
- The value of the
javaMethod
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 TestStep build(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<TestStep.Builder> init)
Creates an immutable instance of TestStep. The values can be initialized by using the init parameter.- Parameters:
init
- The initializer- Returns:
- An immutable TestStep instance
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
copy
public TestStep copy(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<TestStep.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 TestStep instance
-
-