Class AbstractAppExtension<T extends java.lang.annotation.Annotation>
- java.lang.Object
-
- org.spockframework.runtime.extension.AbstractAnnotationDrivenExtension<T>
-
- ru.vyarus.dropwizard.guice.test.spock.ext.AbstractAppExtension<T>
-
- Type Parameters:
T
- extension annotation
- All Implemented Interfaces:
org.spockframework.runtime.extension.IAnnotationDrivenExtension<T>
- Direct Known Subclasses:
DropwizardAppExtension
,GuiceyAppExtension
public abstract class AbstractAppExtension<T extends java.lang.annotation.Annotation> extends org.spockframework.runtime.extension.AbstractAnnotationDrivenExtension<T>
Base class for guicey spock extensions. Extensions useDropwizardTestSupport
internally.- Since:
- 03.01.2015
-
-
Constructor Summary
Constructors Constructor Description AbstractAppExtension()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract GuiceyInterceptor.EnvironmentSupport
buildSupport(T annotation, java.lang.Class<?> test)
protected io.dropwizard.testing.ConfigOverride[]
convertOverrides(ConfigOverride... overrides)
Utility method to convert configuration overrides from annotation to rule compatible format.protected abstract java.lang.Class<? extends GuiceyConfigurationHook>[]
getHooks(T annotation)
void
visitSpec(org.spockframework.runtime.model.SpecInfo spec)
void
visitSpecAnnotation(T useApplication, org.spockframework.runtime.model.SpecInfo spec)
-
-
-
Method Detail
-
visitSpecAnnotation
public void visitSpecAnnotation(T useApplication, org.spockframework.runtime.model.SpecInfo spec)
- Specified by:
visitSpecAnnotation
in interfaceorg.spockframework.runtime.extension.IAnnotationDrivenExtension<T extends java.lang.annotation.Annotation>
- Overrides:
visitSpecAnnotation
in classorg.spockframework.runtime.extension.AbstractAnnotationDrivenExtension<T extends java.lang.annotation.Annotation>
-
visitSpec
public void visitSpec(org.spockframework.runtime.model.SpecInfo spec)
-
getHooks
protected abstract java.lang.Class<? extends GuiceyConfigurationHook>[] getHooks(T annotation)
- Parameters:
annotation
- extension annotation instance- Returns:
- configuration hooks defined in annotation
-
buildSupport
protected abstract GuiceyInterceptor.EnvironmentSupport buildSupport(T annotation, java.lang.Class<?> test)
- Parameters:
annotation
- extension annotation instancetest
- test class- Returns:
- environment support object
-
convertOverrides
protected io.dropwizard.testing.ConfigOverride[] convertOverrides(ConfigOverride... overrides)
Utility method to convert configuration overrides from annotation to rule compatible format.- Parameters:
overrides
- override annotations- Returns:
- dropwizard config override objects
-
-