Package org.spincast.testing.defaults
Class NoAppCustomContextTypesTestingBase<R extends RequestContext<?>,W extends WebsocketContext<?>>
java.lang.Object
org.spincast.testing.core.SpincastTestBase
org.spincast.testing.defaults.NoAppCustomContextTypesTestingBase<R,W>
- All Implemented Interfaces:
BeforeAfterClassMethodsProvider
,CanBeDisabled
,RepeatedClassAfterMethodProvider
,TestFailureListener
- Direct Known Subclasses:
NoAppTestingBase
public abstract class NoAppCustomContextTypesTestingBase<R extends RequestContext<?>,W extends WebsocketContext<?>>
extends SpincastTestBase
-
Field Summary
Fields inherited from class org.spincast.testing.core.SpincastTestBase
logger, spincastConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.inject.Injector
The test class must implement this method to create the Guice injector.protected com.google.inject.Module
Can be overriden with something like :protected List<SpincastPlugin>
The extra required plugins.protected final com.google.inject.Module
We make this final to stay consistent with theAppBasedTestingBase
testing hierarchy: to add an extra Module, you also need to override thegetExtraOverridingModule()
method here...protected final List<SpincastPlugin>
We make this final to stay consistent with theAppBasedTestingBase
testing hierarchy: to add extra plugins, you also need to override thegetExtraPlugins()
method here...protected String[]
protected abstract Class<? extends RequestContext<?>>
protected abstract Class<? extends WebsocketContext<?>>
Methods inherited from class org.spincast.testing.core.SpincastTestBase
addExtraSystemProperties, afterClass, afterClassLoops, afterTest, beforeClass, beforeClassException, beforeTest, createGuiceTweaker, createTestingDir, createTestingFilePath, createTestingFilePath, deleteTestingWritableTempDir, getExtraExactBindingsToRemoveBeforePlugins, getExtraSystemProperties, getGuiceTweakerFromThreadLocal, getGuiceTweakerPluginsToDisable, getInjector, getSpincastConfig, getTestingConfigImplementationClass, getTestingWritableTempDir, isDisableBindCurrentClass, isTestClassDisabledPostBeforeClass, isTestClassDisabledPreBeforeClass, resetSystemProperties, testFailure, tweakConfigurations, validateCreatedInjector
-
Constructor Details
-
NoAppCustomContextTypesTestingBase
public NoAppCustomContextTypesTestingBase()
-
-
Method Details
-
createInjector
protected com.google.inject.Injector createInjector()Description copied from class:SpincastTestBase
The test class must implement this method to create the Guice injector. It can be done by starting a real application (with amain(...)
method) or by creating a custom Injector.- Specified by:
createInjector
in classSpincastTestBase
-
getMainArgs
-
getGuiceTweakerExtraPlugins
We make this final to stay consistent with theAppBasedTestingBase
testing hierarchy: to add extra plugins, you also need to override thegetExtraPlugins()
method here...- Overrides:
getGuiceTweakerExtraPlugins
in classSpincastTestBase
-
getExtraPlugins
The extra required plugins. Example:List<SpincastPlugin> extraPlugins = super.getExtraPlugins(); extraPlugins.add(new XXX()); return extraPlugins;
-
getGuiceTweakerExtraOverridingModule
protected final com.google.inject.Module getGuiceTweakerExtraOverridingModule()We make this final to stay consistent with theAppBasedTestingBase
testing hierarchy: to add an extra Module, you also need to override thegetExtraOverridingModule()
method here...- Overrides:
getGuiceTweakerExtraOverridingModule
in classSpincastTestBase
-
getExtraOverridingModule
protected com.google.inject.Module getExtraOverridingModule()Can be overriden with something like :return Modules.override(super.getExtraOverridingModule()).with(new SpincastGuiceModuleBase() { protected void configure() { // ... } });
-
getRequestContextImplementationClass
-
getWebsocketContextImplementationClass
-