Package org.spincast.testing.defaults
Class NoAppStartHttpServerCustomContextTypesTestingBase<R extends org.spincast.core.exchange.RequestContext<?>,W extends org.spincast.core.websocket.WebsocketContext<?>>
java.lang.Object
org.spincast.testing.core.SpincastTestBase
org.spincast.testing.core.AppBasedTestingBase<R,W>
org.spincast.testing.defaults.NoAppStartHttpServerCustomContextTypesTestingBase<R,W>
- All Implemented Interfaces:
org.spincast.testing.junitrunner.BeforeAfterClassMethodsProvider,org.spincast.testing.junitrunner.CanBeDisabled,org.spincast.testing.junitrunner.RepeatedClassAfterMethodProvider,org.spincast.testing.junitrunner.TestFailureListener
- Direct Known Subclasses:
NoAppStartHttpServerTestingBase
public abstract class NoAppStartHttpServerCustomContextTypesTestingBase<R extends org.spincast.core.exchange.RequestContext<?>,W extends org.spincast.core.websocket.WebsocketContext<?>>
extends org.spincast.testing.core.AppBasedTestingBase<R,W>
Base class for testing without an App but when an HTTP
server is required.
Note that, by default, all routes are cleared
before each test! Even routes added by plugins...
To change this behavior, override the
clearRoutes()
method.
-
Field Summary
Fields inherited from class org.spincast.testing.core.SpincastTestBase
logger, spincastConfig -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDon't forget to first callsuper.beforeClass()protected voidAllows some initialization to be run once the Guice context is created, but before the Server is started.voidRan before every test.protected final voidprotected voidprotected org.spincast.defaults.bootstrapping.SpincastBootstrapperprotected final org.spincast.testing.core.AppTestingConfigsprotected String[]protected abstract Class<? extends org.spincast.core.exchange.RequestContext<?>>protected Class<? extends org.spincast.core.config.SpincastConfig>protected abstract Class<? extends org.spincast.core.websocket.WebsocketContext<?>>protected booleanShould the default Spincast Routes be removed too? Or only the custom ones?protected voidMethods inherited from class org.spincast.testing.core.AppBasedTestingBase
afterClass, clearPreviousResponseCookies, CONNECT, CONNECT, CONNECT, createInjector, createTestUrl, createTestUrl, createTestUrl, createTestUrl, DELETE, DELETE, DELETE, formatDate, GET, GET, GET, getCookieFactory, getExtraExactBindingsToRemoveBeforePlugins, getExtraOverridingModule, getExtraPlugins, getGuiceTweakerExtraOverridingModule, getGuiceTweakerExtraPlugins, getHttpClient, getPreviousResponseCookie, getPreviousResponseCookies, getRouter, getServer, getTestingConfigImplementationClass, HEAD, HEAD, HEAD, isDisableBindCurrentClass, isDisableSllCetificateErrors, isIgnoreMethodsAnnotatedWithInjectDuringConfigurationsTweaking, isSetSecureFalseOnCookiesFromBag, OPTIONS, OPTIONS, OPTIONS, parseDate, PATCH, PATCH, PATCH, POST, POST, POST, PUT, PUT, PUT, saveResponseCookies, stopServer, TRACE, TRACE, TRACE, tweakConfigurations, validateCreatedInjector, websocket, websocket, websocketMethods inherited from class org.spincast.testing.core.SpincastTestBase
addExtraSystemProperties, afterClassLoops, afterTest, beforeClassException, createGuiceTweaker, createTestingDir, createTestingFilePath, createTestingFilePath, deleteTestingWritableTempDir, getExtraSystemProperties, getGuiceTweakerFromThreadLocal, getGuiceTweakerPluginsToDisable, getInjector, getSpincastConfig, getTestingWritableTempDir, isTestClassDisabledPostBeforeClass, isTestClassDisabledPreBeforeClass, resetSystemProperties, testFailure
-
Constructor Details
-
NoAppStartHttpServerCustomContextTypesTestingBase
public NoAppStartHttpServerCustomContextTypesTestingBase()
-
-
Method Details
-
getAppTestingConfigs
protected final org.spincast.testing.core.AppTestingConfigs getAppTestingConfigs() -
getTestingConfigImplementationClass2
protected Class<? extends org.spincast.core.config.SpincastConfig> getTestingConfigImplementationClass2() -
callAppMainMethod
protected final void callAppMainMethod() -
createBootstrapper
protected org.spincast.defaults.bootstrapping.SpincastBootstrapper createBootstrapper() -
getMainArgs
-
beforeClass
public void beforeClass()Don't forget to first callsuper.beforeClass() -
startServer
protected void startServer() -
beforeStartServer
protected void beforeStartServer()Allows some initialization to be run once the Guice context is created, but before the Server is started. -
beforeTest
public void beforeTest()Ran before every test.- Overrides:
beforeTestin classorg.spincast.testing.core.SpincastTestBase
-
clearRoutes
protected void clearRoutes() -
removeSpincastRoutesToo
protected boolean removeSpincastRoutesToo()Should the default Spincast Routes be removed too? Or only the custom ones? -
getRequestContextImplementationClass
protected abstract Class<? extends org.spincast.core.exchange.RequestContext<?>> getRequestContextImplementationClass() -
getWebsocketContextImplementationClass
protected abstract Class<? extends org.spincast.core.websocket.WebsocketContext<?>> getWebsocketContextImplementationClass()
-