Class AbstractWebServicesTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.webservicescommons.webservices.AbstractWebServicesTest
- All Implemented Interfaces:
JaloSessionHolder
@Deprecated(since="6.0",
forRemoval=true)
public abstract class AbstractWebServicesTest
extends ServicelayerTest
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated since 6.0, use
NeedsEmbeddedServer annotation to run embedded server on test class and
WsSecuredRequestBuilder or WsRequestBuilder to construct
Invocation.Builder that you need to access your web services-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.protected static final StringDeprecated, for removal: This API element is subject to removal in a future version.protected static final StringDeprecated, for removal: This API element is subject to removal in a future version.protected javax.ws.rs.client.ClientDeprecated, for removal: This API element is subject to removal in a future version.protected javax.ws.rs.client.WebTargetDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected javax.ws.rs.client.Invocation.BuilderaddAuthorizationHeader(javax.ws.rs.client.WebTarget webResource, String token) Deprecated, for removal: This API element is subject to removal in a future version.protected voidassertBadRequest(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response has status BAD_REQUEST.protected voidassertCreated(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether resource was successfully created.protected voidassertForbidden(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response has status FORBIDDEN.protected voidassertOk(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response has status OK.protected voidassertResponseStatus(javax.ws.rs.core.Response.Status status, javax.ws.rs.core.Response response) Deprecated, for removal: This API element is subject to removal in a future version.protected voidassertResponseStatus(javax.ws.rs.core.Response.Status responseStatus, javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response status has expected value.protected voidassertUnauthorized(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response has status UNAUTHORIZED.protected javax.ws.rs.client.Invocation.BuilderauthorizeClientUsingClientCredentials(javax.ws.rs.client.WebTarget webResource) Deprecated, for removal: This API element is subject to removal in a future version.protected javax.ws.rs.client.Invocation.BuilderauthorizeClientUsingClientCredentials(javax.ws.rs.client.WebTarget webResource, String clientId, String clientSecret) Deprecated, for removal: This API element is subject to removal in a future version.protected javax.ws.rs.client.Invocation.BuilderauthorizeClientUsingResourceOwnerPassword(javax.ws.rs.client.WebTarget webResource) Deprecated, for removal: This API element is subject to removal in a future version.protected javax.ws.rs.client.Invocation.BuilderauthorizeClientUsingResourceOwnerPassword(javax.ws.rs.client.WebTarget webResource, String customerName, String customerPassword) Deprecated, for removal: This API element is subject to removal in a future version.protected javax.ws.rs.client.Invocation.BuilderauthorizeClientUsingResourceOwnerPassword(javax.ws.rs.client.WebTarget webResource, String customerName, String customerPassword, String clientId, String clientSecret) Deprecated, for removal: This API element is subject to removal in a future version.protected voidDeprecated, for removal: This API element is subject to removal in a future version.protected javax.ws.rs.client.ClientcreateClient(org.glassfish.jersey.client.ClientConfig config) Deprecated, for removal: This API element is subject to removal in a future version.Method creates client which accepts all hostname and trust all certificates - because of that it is suitable only for testsprotected EmbeddedServerDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.protected voidDeprecated, for removal: This API element is subject to removal in a future version.protected ExtensionInfoDeprecated, for removal: This API element is subject to removal in a future version.protected StringDeprecated, for removal: This API element is subject to removal in a future version.protected EmbeddedServerBuilderDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.abstract StringDeprecated, for removal: This API element is subject to removal in a future version.protected StringgetOAuth2TokenUsingClientCredentials(javax.ws.rs.client.WebTarget webResource, String clientID, String clientSecret) Deprecated, for removal: This API element is subject to removal in a future version.protected StringgetOAuth2TokenUsingResourceOwnerPassword(javax.ws.rs.client.WebTarget webResource, String clientID, String clientSecret, String customerName, String customerPassword) Deprecated, for removal: This API element is subject to removal in a future version.static StringgetTokenFromJsonStr(String jsonStr) Deprecated, for removal: This API element is subject to removal in a future version.protected StringgetWebRoot(ExtensionInfo extensionInfo) Deprecated, for removal: This API element is subject to removal in a future version.protected StringgetWsVersionForExtensionInfo(ExtensionInfo extensionInfo) Deprecated, for removal: This API element is subject to removal in a future version.booleanisUseSSL()Deprecated, for removal: This API element is subject to removal in a future version.static <T> TDeprecated, for removal: This API element is subject to removal in a future version.static StringDeprecated, for removal: This API element is subject to removal in a future version.voidsetUp()Deprecated, for removal: This API element is subject to removal in a future version.protected javax.ws.rs.client.WebTargetsetupWebResource(ExtensionInfo extensionInfo) Deprecated, for removal: This API element is subject to removal in a future version.voidsetUseSSL(boolean useSSL) Deprecated, for removal: This API element is subject to removal in a future version.static voidDeprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Field Details
-
WS_REQUIRED_CHANNEL_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
EMBEDDEDSERVER_HTTP_PORT_CONFIG_KEY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
EMBEDDEDSERVER_HTTPS_PORT_CONFIG_KEY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
WS_TEST_OAUTH2_TOKEN_ENDPOINT_PATH_KEY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
WS_TEST_OAUTH2_CLIENT_ID_KEY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
WS_TEST_OAUTH2_CLIENT_SECRET_KEY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
WS_TEST_OAUTH2_CUSTOMER_USERNAME_KEY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
WS_TEST_OAUTH2_CUSTOMER_PASSWORD_KEY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
HEADER_AUTH_KEY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
HEADER_AUTH_VALUE_PREFIX
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
webResource
protected javax.ws.rs.client.WebTarget webResourceDeprecated, for removal: This API element is subject to removal in a future version. -
jerseyClient
protected javax.ws.rs.client.Client jerseyClientDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
AbstractWebServicesTest
protected AbstractWebServicesTest()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
stopEmbeddedTomcat
public static void stopEmbeddedTomcat()Deprecated, for removal: This API element is subject to removal in a future version. -
getWsVersionForExtensionInfo
Deprecated, for removal: This API element is subject to removal in a future version. -
setUp
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
Exception
-
createClient
protected javax.ws.rs.client.Client createClient(org.glassfish.jersey.client.ClientConfig config) throws NoSuchAlgorithmException, KeyManagementException Deprecated, for removal: This API element is subject to removal in a future version.Method creates client which accepts all hostname and trust all certificates - because of that it is suitable only for tests- Parameters:
config- client config- Returns:
- created client
- Throws:
NoSuchAlgorithmExceptionKeyManagementException
-
setupWebResource
Deprecated, for removal: This API element is subject to removal in a future version. -
ensureEmbeddedServerIsRunning
public void ensureEmbeddedServerIsRunning()Deprecated, for removal: This API element is subject to removal in a future version. -
createEmbeddedServer
Deprecated, for removal: This API element is subject to removal in a future version. -
beforeEmbeddedServerCreation
protected void beforeEmbeddedServerCreation()Deprecated, for removal: This API element is subject to removal in a future version. -
getEmbeddedServerBuilder
Deprecated, for removal: This API element is subject to removal in a future version. -
ensureWebappIsRunning
protected void ensureWebappIsRunning()Deprecated, for removal: This API element is subject to removal in a future version. -
getExtensionName
Deprecated, for removal: This API element is subject to removal in a future version. -
getExtensionInfo
Deprecated, for removal: This API element is subject to removal in a future version. -
getAuthorizationExtensionName
Deprecated, for removal: This API element is subject to removal in a future version. -
getAuthorizationExtensionInfo
Deprecated, for removal: This API element is subject to removal in a future version. -
getWebRoot
Deprecated, for removal: This API element is subject to removal in a future version. -
authorizeClientUsingClientCredentials
protected javax.ws.rs.client.Invocation.Builder authorizeClientUsingClientCredentials(javax.ws.rs.client.WebTarget webResource, String clientId, String clientSecret) Deprecated, for removal: This API element is subject to removal in a future version. -
authorizeClientUsingClientCredentials
protected javax.ws.rs.client.Invocation.Builder authorizeClientUsingClientCredentials(javax.ws.rs.client.WebTarget webResource) Deprecated, for removal: This API element is subject to removal in a future version. -
authorizeClientUsingResourceOwnerPassword
protected javax.ws.rs.client.Invocation.Builder authorizeClientUsingResourceOwnerPassword(javax.ws.rs.client.WebTarget webResource, String customerName, String customerPassword, String clientId, String clientSecret) Deprecated, for removal: This API element is subject to removal in a future version. -
authorizeClientUsingResourceOwnerPassword
protected javax.ws.rs.client.Invocation.Builder authorizeClientUsingResourceOwnerPassword(javax.ws.rs.client.WebTarget webResource, String customerName, String customerPassword) Deprecated, for removal: This API element is subject to removal in a future version. -
authorizeClientUsingResourceOwnerPassword
protected javax.ws.rs.client.Invocation.Builder authorizeClientUsingResourceOwnerPassword(javax.ws.rs.client.WebTarget webResource) Deprecated, for removal: This API element is subject to removal in a future version. -
getOAuth2TokenUsingClientCredentials
protected String getOAuth2TokenUsingClientCredentials(javax.ws.rs.client.WebTarget webResource, String clientID, String clientSecret) Deprecated, for removal: This API element is subject to removal in a future version. -
getOAuth2TokenUsingResourceOwnerPassword
protected String getOAuth2TokenUsingResourceOwnerPassword(javax.ws.rs.client.WebTarget webResource, String clientID, String clientSecret, String customerName, String customerPassword) Deprecated, for removal: This API element is subject to removal in a future version. -
addAuthorizationHeader
protected javax.ws.rs.client.Invocation.Builder addAuthorizationHeader(javax.ws.rs.client.WebTarget webResource, String token) Deprecated, for removal: This API element is subject to removal in a future version. -
getTokenFromJsonStr
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
jsonToObj
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
objToJson
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
assertOk
protected void assertOk(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response has status OK. Expects correct status (200), content type of 'application/xml'- Parameters:
response-ClientResponseexpectEmptyBody- true - the body is checked for null value
-
assertCreated
protected void assertCreated(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether resource was successfully created. Expects correct status (201), content type of 'application/xml'- Parameters:
response-ClientResponseexpectEmptyBody- true - the body is checked for null value
-
assertForbidden
protected void assertForbidden(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response has status FORBIDDEN. Expects correct status (403), content type of 'application/xml'- Parameters:
response-ClientResponseexpectEmptyBody- true - the body is checked for null value
-
assertBadRequest
protected void assertBadRequest(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response has status BAD_REQUEST. Expects correct status (400), content type of 'application/xml'- Parameters:
response-ClientResponseexpectEmptyBody- true - the body is checked for null value
-
assertUnauthorized
protected void assertUnauthorized(javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response has status UNAUTHORIZED. Expects correct status (401), content type of 'application/xml'- Parameters:
response-ClientResponseexpectEmptyBody- true - the body is checked for null value
-
assertResponseStatus
protected void assertResponseStatus(javax.ws.rs.core.Response.Status responseStatus, javax.ws.rs.core.Response response, boolean expectEmptyBody) Deprecated, for removal: This API element is subject to removal in a future version.Tests whether the response status has expected value.- Parameters:
response-ClientResponseexpectEmptyBody- true - the body is checked for null value
-
assertResponseStatus
protected void assertResponseStatus(javax.ws.rs.core.Response.Status status, javax.ws.rs.core.Response response) Deprecated, for removal: This API element is subject to removal in a future version. -
setUseSSL
public void setUseSSL(boolean useSSL) Deprecated, for removal: This API element is subject to removal in a future version. -
isUseSSL
public boolean isUseSSL()Deprecated, for removal: This API element is subject to removal in a future version.
-