T
- The MicronautTest annotationpublic class MicronautSpockExtension<T extends java.lang.annotation.Annotation> extends AbstractMicronautExtension<org.spockframework.runtime.extension.IMethodInvocation> implements org.spockframework.runtime.extension.IAnnotationDrivenExtension<T>
applicationContext, DISABLED_MESSAGE, embeddedApplication, MISCONFIGURED_MESSAGE, oldValues, refreshScope, specDefinition, TEST_PROPERTY_SOURCE, TEST_ROLLBACK, TEST_TRANSACTION_MODE, TEST_TRANSACTIONAL, testProperties
Constructor and Description |
---|
MicronautSpockExtension() |
Modifier and Type | Method and Description |
---|---|
protected void |
alignMocks(org.spockframework.runtime.extension.IMethodInvocation context,
java.lang.Object instance) |
protected void |
resolveTestProperties(org.spockframework.runtime.extension.IMethodInvocation context,
MicronautTestValue testAnnotationValue,
java.util.Map<java.lang.String,java.lang.Object> testProperties)
Resolves any test properties.
|
protected void |
startApplicationContext()
Starts the application context.
|
void |
visitFeatureAnnotation(T annotation,
org.spockframework.runtime.model.FeatureInfo feature) |
void |
visitFieldAnnotation(T annotation,
org.spockframework.runtime.model.FieldInfo field) |
void |
visitFixtureAnnotation(T annotation,
org.spockframework.runtime.model.MethodInfo fixtureMethod) |
void |
visitSpec(org.spockframework.runtime.model.SpecInfo spec) |
void |
visitSpecAnnotation(T annotation,
org.spockframework.runtime.model.SpecInfo spec) |
afterClass, afterCleanupTest, afterEach, afterSetupTest, afterTestClass, afterTestExecution, afterTestMethod, beforeClass, beforeCleanupTest, beforeEach, beforeSetupTest, beforeTestClass, beforeTestExecution, beforeTestMethod, isTestSuiteBeanPresent, postProcessBuilder
public void visitSpecAnnotation(T annotation, org.spockframework.runtime.model.SpecInfo spec)
visitSpecAnnotation
in interface org.spockframework.runtime.extension.IAnnotationDrivenExtension<T extends java.lang.annotation.Annotation>
public void visitFeatureAnnotation(T annotation, org.spockframework.runtime.model.FeatureInfo feature)
visitFeatureAnnotation
in interface org.spockframework.runtime.extension.IAnnotationDrivenExtension<T extends java.lang.annotation.Annotation>
public void visitFixtureAnnotation(T annotation, org.spockframework.runtime.model.MethodInfo fixtureMethod)
visitFixtureAnnotation
in interface org.spockframework.runtime.extension.IAnnotationDrivenExtension<T extends java.lang.annotation.Annotation>
public void visitFieldAnnotation(T annotation, org.spockframework.runtime.model.FieldInfo field)
visitFieldAnnotation
in interface org.spockframework.runtime.extension.IAnnotationDrivenExtension<T extends java.lang.annotation.Annotation>
public void visitSpec(org.spockframework.runtime.model.SpecInfo spec)
visitSpec
in interface org.spockframework.runtime.extension.IAnnotationDrivenExtension<T extends java.lang.annotation.Annotation>
protected void resolveTestProperties(org.spockframework.runtime.extension.IMethodInvocation context, MicronautTestValue testAnnotationValue, java.util.Map<java.lang.String,java.lang.Object> testProperties)
AbstractMicronautExtension
resolveTestProperties
in class AbstractMicronautExtension<org.spockframework.runtime.extension.IMethodInvocation>
context
- The test contexttestAnnotationValue
- The test annotationtestProperties
- The test propertiesprotected void startApplicationContext()
AbstractMicronautExtension
startApplicationContext
in class AbstractMicronautExtension<org.spockframework.runtime.extension.IMethodInvocation>
protected void alignMocks(org.spockframework.runtime.extension.IMethodInvocation context, java.lang.Object instance)
alignMocks
in class AbstractMicronautExtension<org.spockframework.runtime.extension.IMethodInvocation>
context
- The contextinstance
- The mock instance to inject