Class MethodContext
- java.lang.Object
-
- ru.vyarus.spock.jupiter.engine.context.AbstractContext
-
- ru.vyarus.spock.jupiter.engine.context.MethodContext
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.junit.jupiter.api.extension.ExtensionContext
public class MethodContext extends AbstractContext
Represent feature level (test method level). In case of test iterations (data-driven) each iteration will have its own context (required to renew extension instances).Based on
org.junit.jupiter.engine.descriptor.MethodExtensionContextfrom junit-jupiter-engine.- Since:
- 20.12.2021
-
-
Constructor Summary
Constructors Constructor Description MethodContext(ClassContext parent, ExtensionRegistry registry, org.spockframework.runtime.model.FeatureInfo feature, java.lang.Object testInstance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDisplayName()java.util.Optional<java.lang.Object>getTestInstance()java.util.Optional<org.junit.jupiter.api.extension.TestInstances>getTestInstances()java.util.Optional<java.lang.reflect.Method>getTestMethod()java.lang.StringgetUniqueId()-
Methods inherited from class ru.vyarus.spock.jupiter.engine.context.AbstractContext
close, getCollector, getConfigurationParameter, getConfigurationParameter, getElement, getExecutionException, getExecutionMode, getParent, getRegistry, getRoot, getSpec, getStore, getTags, getTestClass, getTestInstanceLifecycle, publishReportEntry
-
-
-
-
Constructor Detail
-
MethodContext
public MethodContext(ClassContext parent, ExtensionRegistry registry, org.spockframework.runtime.model.FeatureInfo feature, java.lang.Object testInstance)
-
-
Method Detail
-
getUniqueId
public java.lang.String getUniqueId()
-
getDisplayName
public java.lang.String getDisplayName()
-
getTestMethod
public java.util.Optional<java.lang.reflect.Method> getTestMethod()
-
getTestInstance
public java.util.Optional<java.lang.Object> getTestInstance()
-
getTestInstances
public java.util.Optional<org.junit.jupiter.api.extension.TestInstances> getTestInstances()
-
-