public abstract class AppBasedWebsocketTestingBase<R extends org.spincast.core.exchange.RequestContext<?>,W extends org.spincast.core.websocket.WebsocketContext<?>> extends AppBasedTestingBase<org.spincast.core.exchange.DefaultRequestContext,W>
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
protected org.spincast.plugins.httpclient.utils.SpincastHttpClientUtils |
spincastHttpClientUtils |
spincastConfig| Constructor and Description |
|---|
AppBasedWebsocketTestingBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeTest() |
protected void |
closeAllWebsocketEndpoints() |
protected com.google.inject.Module |
getExtraOverridingModule2() |
protected com.google.inject.Module |
getExtraOverridingModule3() |
protected String |
getSecSocketKey()
Generates a random String for the "Sec-WebSocket-Key"
Websocket header.
|
protected int |
getServerPingIntervalSeconds() |
protected org.spincast.plugins.httpclient.utils.SpincastHttpClientUtils |
getSpincastHttpClientUtils() |
protected org.spincast.plugins.undertow.config.SpincastUndertowConfig |
getSpincastUndertowConfigImplementation() |
protected String |
getWebsocketTestExpectedWebsocketV13AcceptHeaderValue() |
protected void |
validateIsNotWebsocketUpgradeHttpResponse(org.spincast.plugins.httpclient.HttpResponse response)
Validates the response is NOT a Websocket upgrade permission.
|
protected void |
validateIsWebsocketUpgradeHttpResponse(String path,
org.spincast.plugins.httpclient.HttpResponse response)
Validates the response is a Websocket upgrade permission.
|
protected org.spincast.plugins.httpclient.websocket.builders.WebsocketRequestBuilder |
websocket(String pathOrUrl,
boolean isFullUrl,
boolean isHttps) |
afterClass, CONNECT, CONNECT, CONNECT, createInjector, createTestUrl, createTestUrl, createTestUrl, DELETE, DELETE, DELETE, formatDate, GET, GET, GET, getAppTestingConfigs, getCookieFactory, getExtraOverridingModule, getExtraPlugins, getExtraPlugins2, getHttpClient, getRouter, getServer, getTestingConfigImplementationClass, HEAD, HEAD, HEAD, isDisableBindCurrentClass, isDisableSllCetificateErrors, OPTIONS, OPTIONS, OPTIONS, parseDate, PATCH, PATCH, PATCH, POST, POST, POST, PUT, PUT, PUT, startApp, stopServer, TRACE, TRACE, TRACE, validateCreatedInjector, websocket, websocketaddExtraSystemProperties, afterClassLoops, afterTest, beforeClass, beforeClassException, createGuiceTweaker, createTestingFilePath, createTestingFilePath, deleteTempDir, getExtraSystemProperties, getGuiceTweakerFromThreadLocal, getInjector, getSpincastConfig, getTestingWritableDir, resetSystemProperties, testFailureprotected final org.slf4j.Logger logger
@Inject protected org.spincast.plugins.httpclient.utils.SpincastHttpClientUtils spincastHttpClientUtils
protected com.google.inject.Module getExtraOverridingModule2()
getExtraOverridingModule2 in class AppBasedTestingBase<org.spincast.core.exchange.DefaultRequestContext,W extends org.spincast.core.websocket.WebsocketContext<?>>protected com.google.inject.Module getExtraOverridingModule3()
protected org.spincast.plugins.undertow.config.SpincastUndertowConfig getSpincastUndertowConfigImplementation()
protected org.spincast.plugins.httpclient.utils.SpincastHttpClientUtils getSpincastHttpClientUtils()
public void beforeTest()
beforeTest in class SpincastTestBaseprotected int getServerPingIntervalSeconds()
protected void closeAllWebsocketEndpoints()
protected String getWebsocketTestExpectedWebsocketV13AcceptHeaderValue()
protected String getSecSocketKey()
protected void validateIsWebsocketUpgradeHttpResponse(String path, org.spincast.plugins.httpclient.HttpResponse response)
protected void validateIsNotWebsocketUpgradeHttpResponse(org.spincast.plugins.httpclient.HttpResponse response)
protected org.spincast.plugins.httpclient.websocket.builders.WebsocketRequestBuilder websocket(String pathOrUrl, boolean isFullUrl, boolean isHttps)
websocket in class AppBasedTestingBase<org.spincast.core.exchange.DefaultRequestContext,W extends org.spincast.core.websocket.WebsocketContext<?>>sslInfo - If not null, then the initial connection
is considered to be HTTPS and Websocket is served using SSL too.Copyright © 2018. All rights reserved.