public.javadoc.org.spincast.testing.defaults.NoAppCustomContextTypesTestingBase.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
NoAppCustomContextTypesTestingBase (org.spincast:spincast-framework 1.0.0 API)
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, 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
Constructors
Constructor and Description
NoAppCustomContextTypesTestingBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods
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()
-
Methods inherited from class org.spincast.testing.core.SpincastTestBase
addExtraSystemProperties, afterClass, afterClassLoops, afterTest, beforeClass, beforeClassException, beforeTest, createGuiceTweaker, createTestingDir, createTestingFilePath, createTestingFilePath, deleteTestingWritableTempDir, getExtraExactBindingsToRemoveBeforePlugins, getExtraSystemProperties, getGuiceTweakerFromThreadLocal, getInjector, getSpincastConfig, getTestingConfigImplementationClass, getTestingWritableTempDir, isDisableBindCurrentClass, resetSystemProperties, testFailure, tweakConfigurations, validateCreatedInjector
-
-
Method Detail
-
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 a main(...)
method) or by
creating a custom Injector.
- Specified by:
createInjector
in class SpincastTestBase
-
getMainArgs
protected String[] getMainArgs()
-
getGuiceTweakerExtraPlugins
protected final 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...
- Overrides:
getGuiceTweakerExtraPlugins
in class SpincastTestBase
-
getExtraPlugins
protected List<SpincastPlugin> 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 the
AppBasedTestingBase
testing hierarchy:
to add an extra Module, you also need to override the
getExtraOverridingModule()
method here...
- Overrides:
getGuiceTweakerExtraOverridingModule
in class SpincastTestBase
-
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
protected abstract Class<? extends RequestContext<?>> getRequestContextImplementationClass()
-
getWebsocketContextImplementationClass
protected abstract Class<? extends WebsocketContext<?>> getWebsocketContextImplementationClass()
Copyright © 2019. All rights reserved.