
public.javadoc.org.spincast.testing.defaults.AppBasedWebsocketTestingBase.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.
AppBasedWebsocketTestingBase (org.spincast:spincast-framework 2.1.1 API)
Package org.spincast.testing.defaults
Class AppBasedWebsocketTestingBase<R extends RequestContext<?>,W extends WebsocketContext<?>>
java.lang.Object
org.spincast.testing.core.SpincastTestBase
org.spincast.testing.core.AppBasedTestingBase<DefaultRequestContext,W>
org.spincast.testing.defaults.AppBasedWebsocketTestingBase<R,W>
- All Implemented Interfaces:
BeforeAfterClassMethodsProvider
, CanBeDisabled
, RepeatedClassAfterMethodProvider
, TestFailureListener
- Direct Known Subclasses:
NoAppWebsocketTestingBase
public abstract class AppBasedWebsocketTestingBase<R extends RequestContext<?>,W extends WebsocketContext<?>>
extends AppBasedTestingBase<DefaultRequestContext,W>
Base class for WebSocket testing.
-
Field Summary
Fields
Modifier and Type
Field
Description
protected static final org.slf4j.Logger
protected SpincastHttpClientUtils
Fields inherited from class org.spincast.testing.core.SpincastTestBase
spincastConfig
-
Constructor Summary
Constructors
-
Method Summary
Modifier and Type
Method
Description
void
This method will be called before each test.
protected void
protected com.google.inject.Module
Can be overriden with something like :
protected com.google.inject.Module
protected String
Generates a random String for the "Sec-WebSocket-Key"
Websocket header.
protected int
protected SpincastHttpClientUtils
protected SpincastUndertowConfig
protected String
protected void
Validates the response is NOT a Websocket upgrade permission.
protected void
validateIsWebsocketUpgradeHttpResponse(String path,
HttpResponse response)
Validates the response is a Websocket upgrade permission.
protected WebsocketRequestBuilder
Methods inherited from class org.spincast.testing.core.AppBasedTestingBase
afterClass, beforeClass, callAppMainMethod, clearPreviousResponseCookies, CONNECT, CONNECT, CONNECT, createInjector, createTestUrl, createTestUrl, createTestUrl, createTestUrl, DELETE, DELETE, DELETE, formatDate, GET, GET, GET, getAppTestingConfigs, getCookieFactory, getExtraExactBindingsToRemoveBeforePlugins, 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
Methods 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
-
Field Details
-
logger
protected static final org.slf4j.Logger logger
-
spincastHttpClientUtils
-
Constructor Details
-
AppBasedWebsocketTestingBase
public AppBasedWebsocketTestingBase()
-
Method Details
-
getExtraOverridingModule
protected com.google.inject.Module getExtraOverridingModule()
Description copied from class: AppBasedTestingBase
Can be overriden with something like :
return Modules.override(super.getExtraOverridingModule()).with(new SpincastGuiceModuleBase() {
protected void configure() {
// ...
}
});
- Overrides:
getExtraOverridingModule
in class AppBasedTestingBase<DefaultRequestContext,W extends WebsocketContext<?>>
-
getExtraOverridingModule3
protected com.google.inject.Module getExtraOverridingModule3()
-
getSpincastUndertowConfigImplementation
-
getSpincastHttpClientUtils
-
beforeTest
public void beforeTest()
Description copied from class: SpincastTestBase
This method will be called before each test.
- Overrides:
beforeTest
in class SpincastTestBase
-
getServerPingIntervalSeconds
protected int getServerPingIntervalSeconds()
-
closeAllWebsocketEndpoints
protected void closeAllWebsocketEndpoints()
-
getWebsocketTestExpectedWebsocketV13AcceptHeaderValue
-
getSecSocketKey
Generates a random String for the "Sec-WebSocket-Key"
Websocket header.
-
validateIsWebsocketUpgradeHttpResponse
Validates the response is a Websocket upgrade permission.
-
validateIsNotWebsocketUpgradeHttpResponse
Validates the response is NOT a Websocket upgrade permission.
-
websocket
- Overrides:
websocket
in class AppBasedTestingBase<DefaultRequestContext,W extends WebsocketContext<?>>
- Parameters:
sslInfo
- If not null, then the initial connection
is considered to be HTTPS and Websocket is served using SSL too.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy