Package org.spockframework.runtime.model
Class IterationInfo
java.lang.Object
org.spockframework.runtime.model.NodeInfo<FeatureInfo,AnnotatedElement>
org.spockframework.runtime.model.IterationInfo
Runtime information about an iteration of a feature method.
-
Constructor Summary
ConstructorsConstructorDescriptionIterationInfo
(FeatureInfo feature, Object[] dataValues, int estimatedNumIterations) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCleanup
(Runnable cleanup) Object[]
Return this iteration's data values for the ongoing execution of the owning feature method.int
Returns the estimated total number of iterations for the ongoing execution of the owning feature method.getName()
Returns the name of this iteration.Methods inherited from class org.spockframework.runtime.model.NodeInfo
getDescription, getLine, getMetadata, getParent, isStub, setDescription, setLine, setMetadata, setName, setParent, setReflection
-
Constructor Details
-
IterationInfo
-
-
Method Details
-
getReflection
- Overrides:
getReflection
in classNodeInfo<FeatureInfo,
AnnotatedElement>
-
getName
Returns the name of this iteration. No strong guarantees are provided for this name, except that it is non-null. For example, it may be the same as the feature name, and it may not be unique among iterations of the same feature execution. Nevertheless, this is generally the name that should be presented to the user (if any).- Overrides:
getName
in classNodeInfo<FeatureInfo,
AnnotatedElement> - Returns:
- the name of this iteration
-
getDataValues
Return this iteration's data values for the ongoing execution of the owning feature method. The names of the data values (in the same order) are available throughFeatureInfo.getDataVariables()
.- Returns:
- this iteration's data values for the ongoing execution of the owning feature method
-
getEstimatedNumIterations
public int getEstimatedNumIterations()Returns the estimated total number of iterations for the ongoing execution of the owning feature method. The value is obtained by calling size() on each data provider before the first iteration is run. It is only an estimate and won't change during feature execution (i.e. all FeatureInfos will return the same value).- Returns:
- the estimated total number of iterations for the execution of the owning feature method
-
addCleanup
-
getCleanups
-