Class GuiceyInterceptor.AbstractEnvironmentSupport
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.test.spock.ext.GuiceyInterceptor.AbstractEnvironmentSupport
-
- All Implemented Interfaces:
GuiceyInterceptor.EnvironmentSupport
- Enclosing class:
- GuiceyInterceptor
public abstract static class GuiceyInterceptor.AbstractEnvironmentSupport extends java.lang.Object implements GuiceyInterceptor.EnvironmentSupport
Base environment support implementation. Used as-is for dropwizard test and requires advanced command handling for guicey test (because dropwizard support will not properly shutdown it).
-
-
Constructor Summary
Constructors Constructor Description AbstractEnvironmentSupport(java.lang.Class<?> test)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
after()
Shutdown environment.void
before()
Prepare environment.protected abstract io.dropwizard.testing.DropwizardTestSupport
build()
ClientSupport
getClient()
com.google.inject.Injector
getInjector()
-
-
-
Method Detail
-
build
protected abstract io.dropwizard.testing.DropwizardTestSupport build()
-
before
public void before() throws java.lang.Exception
Description copied from interface:GuiceyInterceptor.EnvironmentSupport
Prepare environment.- Specified by:
before
in interfaceGuiceyInterceptor.EnvironmentSupport
- Throws:
java.lang.Exception
- on error
-
after
public void after()
Description copied from interface:GuiceyInterceptor.EnvironmentSupport
Shutdown environment.- Specified by:
after
in interfaceGuiceyInterceptor.EnvironmentSupport
-
getInjector
public com.google.inject.Injector getInjector()
- Specified by:
getInjector
in interfaceGuiceyInterceptor.EnvironmentSupport
- Returns:
- injector instance
-
getClient
public ClientSupport getClient()
- Specified by:
getClient
in interfaceGuiceyInterceptor.EnvironmentSupport
- Returns:
- client object
-
-