public abstract class NoAppCustomContextTypesTestingBase<R extends RequestContext<?>,W extends WebsocketContext<?>> extends SpincastTestBase
logger, spincastConfig| Constructor and Description |
|---|
NoAppCustomContextTypesTestingBase() |
| Modifier and Type | Method and Description |
|---|---|
protected com.google.inject.Injector |
createInjector()
The test class must implement this method to create
the Guice injector.
|
protected com.google.inject.Module |
getExtraOverridingModule()
Can be overriden with something like :
|
protected List<SpincastPlugin> |
getExtraPlugins()
The extra required plugins.
|
protected com.google.inject.Module |
getGuiceTweakerExtraOverridingModule()
We make this final to stay consistent with the
AppBasedTestingBase testing hierarchy:
to add an extra Module, you also need to override the
getExtraOverridingModule() method here... |
protected List<SpincastPlugin> |
getGuiceTweakerExtraPlugins()
We make this final to stay consistent with the
AppBasedTestingBase testing hierarchy:
to add extra plugins, you also need to override the
getExtraPlugins() method here... |
protected String[] |
getMainArgs() |
protected abstract Class<? extends RequestContext<?>> |
getRequestContextImplementationClass() |
protected abstract Class<? extends WebsocketContext<?>> |
getWebsocketContextImplementationClass() |
addExtraSystemProperties, afterClass, afterClassLoops, afterTest, beforeClass, beforeClassException, beforeTest, createGuiceTweaker, createTestingFilePath, createTestingFilePath, deleteTestingWritableTempDir, getExtraExactBindingsToRemoveBeforePlugins, getExtraSystemProperties, getGuiceTweakerFromThreadLocal, getInjector, getSpincastConfig, getTestingConfigImplementationClass, getTestingWritableTempDir, isDisableBindCurrentClass, resetSystemProperties, testFailure, validateCreatedInjectorprotected com.google.inject.Injector createInjector()
SpincastTestBasemain(...) method) or by
creating a custom Injector.createInjector in class SpincastTestBaseprotected String[] getMainArgs()
protected final List<SpincastPlugin> getGuiceTweakerExtraPlugins()
AppBasedTestingBase testing hierarchy:
to add extra plugins, you also need to override the
getExtraPlugins() method here...getGuiceTweakerExtraPlugins in class SpincastTestBaseprotected List<SpincastPlugin> getExtraPlugins()
List<SpincastPlugin> extraPlugins = super.getExtraPlugins(); extraPlugins.add(new XXX()); return extraPlugins;
protected final com.google.inject.Module getGuiceTweakerExtraOverridingModule()
AppBasedTestingBase testing hierarchy:
to add an extra Module, you also need to override the
getExtraOverridingModule() method here...getGuiceTweakerExtraOverridingModule in class SpincastTestBaseprotected com.google.inject.Module getExtraOverridingModule()
return Modules.override(super.getExtraOverridingModule()).with(new SpincastGuiceModuleBase() {
protected void configure() {
// ...
}
});
protected abstract Class<? extends RequestContext<?>> getRequestContextImplementationClass()
protected abstract Class<? extends WebsocketContext<?>> getWebsocketContextImplementationClass()
Copyright © 2018. All rights reserved.