public abstract class NoAppStartHttpServerCustomContextTypesTestingBase<R extends RequestContext<?>,W extends WebsocketContext<?>> extends AppBasedTestingBase<R,W>
logger, spincastConfig| Constructor and Description |
|---|
NoAppStartHttpServerCustomContextTypesTestingBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeClass()
Called before the tests of the class are ran.
|
protected void |
beforeStartServer()
Allows some initialization to be run once the Guice context
is created, but before the Server is started.
|
void |
beforeTest()
Ran before every test.
|
protected void |
clearRoutes() |
protected SpincastBootstrapper |
createBootstrapper() |
protected AppTestingConfigs |
getAppTestingConfigs()
We force test classes to provide information about
the required testing configurations.
|
protected String[] |
getMainArgs() |
protected abstract Class<? extends RequestContext<?>> |
getRequestContextImplementationClass() |
protected Class<? extends SpincastConfig> |
getTestingConfigImplementationClass2() |
protected abstract Class<? extends WebsocketContext<?>> |
getWebsocketContextImplementationClass() |
protected boolean |
removeSpincastRoutesToo()
Should the default Spincast Routes
be removed too? Or only the custom ones?
|
protected void |
startApp()
Starts the application.
|
protected void |
startServer() |
afterClass, CONNECT, CONNECT, CONNECT, createInjector, createTestUrl, createTestUrl, createTestUrl, DELETE, DELETE, DELETE, formatDate, GET, GET, GET, getCookieFactory, getExtraOverridingModule, getExtraOverridingModule2, getExtraPlugins, getExtraPlugins2, getHttpClient, getRouter, getServer, getTestingConfigImplementationClass, HEAD, HEAD, HEAD, isDisableBindCurrentClass, isDisableSllCetificateErrors, OPTIONS, OPTIONS, OPTIONS, parseDate, PATCH, PATCH, PATCH, POST, POST, POST, PUT, PUT, PUT, stopServer, TRACE, TRACE, TRACE, validateCreatedInjector, websocket, websocket, websocketaddExtraSystemProperties, afterClassLoops, afterTest, beforeClassException, createGuiceTweaker, createTestingFilePath, createTestingFilePath, deleteTempDir, getExtraSystemProperties, getGuiceTweakerFromThreadLocal, getInjector, getSpincastConfig, getTestingWritableDir, resetSystemProperties, testFailurepublic NoAppStartHttpServerCustomContextTypesTestingBase()
protected final AppTestingConfigs getAppTestingConfigs()
AppBasedTestingBaseThe bindings for those components will be automatically created.
getAppTestingConfigs in class AppBasedTestingBase<R extends RequestContext<?>,W extends WebsocketContext<?>>null
to disable this process (you will then have to add the
required config bindings by yourself).protected Class<? extends SpincastConfig> getTestingConfigImplementationClass2()
protected final void startApp()
AppBasedTestingBase
In this method, you should call your
application main() method.
Returns a boolean to tell if the class calling the Spincast bootstrapper, commonly named "App", should be added to the Guice context or not.
Returning true is common if your
test class runs integration tests, since
it is probably the calling class that starts the
HTTP server. Return false if you
don't need any server to be started, but still
want the full application Guice context to be
created (used in general for unit tests).
startApp in class AppBasedTestingBase<R extends RequestContext<?>,W extends WebsocketContext<?>>protected SpincastBootstrapper createBootstrapper()
protected String[] getMainArgs()
public void beforeClass()
BeforeAfterClassMethodsProviderbeforeClass in interface BeforeAfterClassMethodsProviderbeforeClass in class SpincastTestBaseprotected void startServer()
protected void beforeStartServer()
public void beforeTest()
beforeTest in class SpincastTestBaseprotected void clearRoutes()
protected boolean removeSpincastRoutesToo()
protected abstract Class<? extends RequestContext<?>> getRequestContextImplementationClass()
protected abstract Class<? extends WebsocketContext<?>> getWebsocketContextImplementationClass()
Copyright © 2018. All rights reserved.