Class BaseOrderManagementWebservicesIntegrationTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.ordermanagementwebservices.util.BaseOrderManagementWebservicesIntegrationTest
- All Implemented Interfaces:
JaloSessionHolder
- Direct Known Subclasses:
OrderControllerIntegrationTest,ReturnsControllerIntegrationTest,WorkflowControllerIntegrationTest
@IntegrationTest
@ContextConfiguration(locations="classpath:/ordermanagementwebservices-spring-test.xml")
public class BaseOrderManagementWebservicesIntegrationTest
extends ServicelayerTest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertBadRequestWithContent(javax.ws.rs.core.Response response, String errorReason, String errorSubject, String ErrorSubjectType) Validates the firstErrorWsDTOcontent of theErrorListWsDTOof the bad requestprotected OrderSearchPageWsDtoprotected <T> TgetDefaultSecuredRestCall(String path, String username, String password, String fields, String currentPage, String pageSize, Class<T> responseType) Builds a secured GET rest callGets aListof all extensions loaded in the current setup.protected OrderWsDTOgetOrderByCode(String code) protected CancelReasonListWsDTOprotected OrderEntrySearchPageWsDTOprotected OrderEntryWsDTOgetOrderEntryForOrderCodeAndEntryNumber(String code, String entryNumber) protected FraudReportListWsDTOgetOrderFraudReports(String code) protected <T> TgetOrdersByStatuses(String orderStatuses, Class<T> responseType) protected OrderStatusListWsDTOprotected RefundReasonListWsDTOprotected ReturnActionListWsDTOprotected CancelReasonListWsDTOprotected ReturnEntrySearchPageWsDTOgetReturnEntriesForReturnCode(String returnCode) protected ReturnRequestWsDTOgetReturnForReturnCode(String returnCode) protected ReturnSearchPageWsDTOprotected <T> TgetReturnsByStatus(String statuses, Class<T> responseType) protected ReturnStatusListWsDTOprotected SetupImpexServiceprotected WorkflowActionListWsDtoprotected WsSecuredRequestBuilderRetrieves a newWsSecuredRequestBuilderin order to build web requests.protected javax.ws.rs.core.Responseprotected javax.ws.rs.core.ResponsepostCancelOrder(OrderCancelRequestWsDTO orderCancelRequestWsDTO, String code) protected javax.ws.rs.core.ResponsepostCancelReturnRequestByDefault(CancelReturnRequestWsDTO cancelReturnRequestWsDTO) protected javax.ws.rs.core.ResponsepostCreateOrder(OrderRequestWsDTO orderRequestWsDTO) protected javax.ws.rs.core.ResponsepostDecideWorkflowAction(String workflowCode, String workflowDecisionCode) protected javax.ws.rs.core.ResponsepostDecideWorkflowActions(WorkflowCodesListWsDto workflowCodesListWsDto, String decisionCode) protected <T> javax.ws.rs.core.ResponsepostDefaultSecuredRestCall(String path, String username, String password, String fields, T requestBodyWsDTO) Builds a secured POST rest call.protected <T> TpostDefaultSecuredRestCall(String path, String username, String password, String fields, T requestBodyWsDTO, Class<T> responseType) Builds a POST rest call with the return type. protected javax.ws.rs.core.ResponsepostEmptyBodySecuredRestCall(String path, String username, String password) Builds a secured POST rest call with an empty bodyprotected javax.ws.rs.core.Responseprotected javax.ws.rs.core.Responseprotected javax.ws.rs.core.ResponsepostManualPaymentVoid(String code) protected javax.ws.rs.core.ResponsepostManualTaxCommit(String code) protected javax.ws.rs.core.ResponsepostManualTaxRequote(String code) protected javax.ws.rs.core.ResponsepostManualTaxVoid(String code) protected javax.ws.rs.core.Responseprotected javax.ws.rs.core.Responseprotected javax.ws.rs.core.ResponsepostRequestManualTaxReversalForReturnRequest(String returnCode) protected <S,T> T putDefaultSecuredRestCall(String path, String username, String password, String fields, S requestBodyWsDTO, Class<T> responseType) Builds a PUT rest callprotected ReturnRequestWsDTOputUpdateReturnByReturnCode(String code, ReturnRequestModificationWsDTO returnRequestModificationWsDTO) voidsetEnumerationService(EnumerationService enumerationService) voidsetSetupImpexService(SetupImpexService setupImpexService) 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
-
DEFAULT_FIELDS
- See Also:
-
DEFAULT_CURRENT_PAGE
- See Also:
-
DEFAULT_PAGE_SIZE
- See Also:
-
ADMIN_USERNAME
- See Also:
-
ADMIN_PASSWORD
- See Also:
-
CUSTOMER_SUPPORT_AGENT_USERNAME
- See Also:
-
CUSTOMER_SUPPORT_AGENT_PASSWORD
- See Also:
-
DEFAULT_CLIENT_ID
- See Also:
-
DEFAULT_CLIENT_SECRET
- See Also:
-
-
Constructor Details
-
BaseOrderManagementWebservicesIntegrationTest
public BaseOrderManagementWebservicesIntegrationTest()
-
-
Method Details
-
getAllOrderByDefault
-
getOrderByCode
-
getOrdersByStatuses
-
getOrderEntriesForOrderCode
-
getOrderEntryForOrderCodeAndEntryNumber
-
getOrderStatusByDefault
-
getOrderFraudReports
-
getOrderCancellationReasons
-
getReturnCancellationReasons
-
getRefundReasons
-
getReturnActions
-
getReturnStatuses
-
getReturns
-
getReturnsByStatus
-
getReturnForReturnCode
-
getReturnEntriesForReturnCode
-
postRequestManualPaymentReversalForReturnRequest
protected javax.ws.rs.core.Response postRequestManualPaymentReversalForReturnRequest(String returnCode) -
postRequestManualTaxReversalForReturnRequest
-
postCancelReturnRequestByDefault
protected javax.ws.rs.core.Response postCancelReturnRequestByDefault(CancelReturnRequestWsDTO cancelReturnRequestWsDTO) -
postApproveFraudulentOrder
-
postRejectFraudulentOrder
-
postCancelOrder
protected javax.ws.rs.core.Response postCancelOrder(OrderCancelRequestWsDTO orderCancelRequestWsDTO, String code) -
postCreateOrder
-
putUpdateReturnByReturnCode
protected ReturnRequestWsDTO putUpdateReturnByReturnCode(String code, ReturnRequestModificationWsDTO returnRequestModificationWsDTO) -
postManualPaymentVoid
-
postManualTaxVoid
-
postManualTaxCommit
-
postManualTaxRequote
-
postManualPaymentReauth
-
postManualDeliveryCostCommit
-
getWorkflowActions
-
postDecideWorkflowAction
-
postDecideWorkflowActions
protected javax.ws.rs.core.Response postDecideWorkflowActions(WorkflowCodesListWsDto workflowCodesListWsDto, String decisionCode) -
getDefaultSecuredRestCall
protected <T> T getDefaultSecuredRestCall(String path, String username, String password, String fields, String currentPage, String pageSize, Class<T> responseType) Builds a secured GET rest call- Parameters:
path- the url for the callusername- the username used for authenticationpassword- the password used for authenticationfields- contains pagination informationcurrentPage- the current page of the requestpageSize- total page sizeresponseType- the response entity type- Returns:
-
postDefaultSecuredRestCall
protected <T> T postDefaultSecuredRestCall(String path, String username, String password, String fields, T requestBodyWsDTO, Class<T> responseType) Builds a POST rest call with the return type. - Type Parameters:
T- type of the body object- Parameters:
path- the url for the callusername- the username used for authenticationpassword- the password used for authenticationfields- contains pagination informationrequestBodyWsDTO- the dto object sent with the requestresponseType- type of class to return- Returns:
- the request class to return after the execution of the call
-
postDefaultSecuredRestCall
protected <T> javax.ws.rs.core.Response postDefaultSecuredRestCall(String path, String username, String password, String fields, T requestBodyWsDTO) Builds a secured POST rest call.- Type Parameters:
T- type of the body object- Parameters:
path- the url for the callusername- the username used for authenticationpassword- the password used for authenticationfields- contains pagination informationrequestBodyWsDTO- the dto object sent with the request- Returns:
- the result of the call
-
postEmptyBodySecuredRestCall
protected javax.ws.rs.core.Response postEmptyBodySecuredRestCall(String path, String username, String password) Builds a secured POST rest call with an empty body- Parameters:
path- the url for the callusername- the username for authenticationpassword- the password for authentication- Returns:
- the result of the call
-
putDefaultSecuredRestCall
protected <S,T> T putDefaultSecuredRestCall(String path, String username, String password, String fields, S requestBodyWsDTO, Class<T> responseType) Builds a PUT rest call- Type Parameters:
T-- Parameters:
path- the url for the callusername- the username used for authenticationpassword- the password used for authenticationfields- contains pagination informationrequestBodyWsDTO- the current dto which is to be updatedresponseType- type of class to return- Returns:
- the request class to return after the execution of the call
-
assertBadRequestWithContent
protected void assertBadRequestWithContent(javax.ws.rs.core.Response response, String errorReason, String errorSubject, String ErrorSubjectType) Validates the firstErrorWsDTOcontent of theErrorListWsDTOof the bad request- Parameters:
response- bad request responseerrorReason- error reasonerrorSubject- error subjectErrorSubjectType- error subject type
-
getWsSecuredRequestBuilder
Retrieves a newWsSecuredRequestBuilderin order to build web requests.- Returns:
- the
WsSecuredRequestBuilder
-
getExtensionNames
Gets aListof all extensions loaded in the current setup.- Returns:
- populated
Listof all loaded extensions
-
getSetupImpexService
-
setSetupImpexService
-
getEnumerationService
-
setEnumerationService
-