Class BaseWarehousingWebservicesIntegrationTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.warehousingwebservices.warehousingwebservices.util.BaseWebservicesIntegrationTest
de.hybris.platform.warehousingwebservices.warehousingwebservices.util.BaseWarehousingWebservicesIntegrationTest
- All Implemented Interfaces:
JaloSessionHolder
- Direct Known Subclasses:
AsnsControllerIntegrationTest,BaseStoresControllerIntegrationTest,ConsignmentsControllerIntegrationTest,OrdersControllerIntegrationTest,PointOfServicesControllerIntegrationTest,ReturnsControllerIntegrationTest,StockLevelsControllersIntegrationTest,WarehousesControllerIntegrationTest
@IntegrationTest
public class BaseWarehousingWebservicesIntegrationTest
extends BaseWebservicesIntegrationTest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Addressesprotected AllocationServiceprotected static final Stringprotected BaseSitesprotected BaseStoresprotected BusinessProcessServiceprotected CommentTypesprotected Componentsprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected DeliveryModesprotected EventServiceprotected FlexibleSearchServiceprotected ModelServiceprotected Ordersprotected PointsOfServiceprotected Productsprotected ReturnCallbackServiceprotected SourcingServiceprotected StockLevelsprotected static final Stringprotected Usersprotected static final Stringprotected static final Stringprotected Warehousesprotected WarehousingReturnServiceFields inherited from class de.hybris.platform.warehousingwebservices.warehousingwebservices.util.BaseWebservicesIntegrationTest
springCustomContextLoaderFields 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 voidprotected voidcleanUpModel(String modelName) protected RefundEntryModelCreates a default return request and approves it.protected ConsignmentReallocationWsDTOCreates aConsignmentReallocationWsDTOprotected OrderModelCreates an order that fails sourcing.protected PackagingInfoWsDTOcreatePackagingInfo(String width, String height, String length, String grossWeight, String insuredValue, String dimensionUnit, String weightUnit) Creates a new packaging information for a consignment with the given attributes.protected RefundEntryModelCreates a return request in aReturnStatus.WAIT.protected OrderModelCreates a default order and consignment.protected AddressWsDTOCreates a US address.protected javax.ws.rs.core.ResponsedeleteDefaultSecuredRestCall(String path, String username, String password, String fields) Builds a DELETE rest callprotected javax.ws.rs.core.ResponsedeleteWarehousesFromPointOfService(String name, String warehouseCode) protected ConsignmentSearchPageWsDtoprotected WarehouseSearchPageWsDtoprotected ConsignmentEntrySearchPageWsDtoprotected ConsignmentWsDTOprotected ConsignmentStatusListWsDTOprotected DeclineReasonListWsDTOprotected <T> TgetDefaultSecuredRestCall(String path, String username, String password, String fields, String currentPage, String pageSize, Class<T> responseType) Builds a secured GET rest callprotected javax.ws.rs.core.ResponsegetEmptySecuredRestCall(String path, String username, String password) this method is to build the rest call with null body for get with the return type Responseprotected PackagingInfoWsDTOprotected PointOfServiceWsDTOprotected WarehouseSearchPageWsDtoprotected StockLevelAdjustmentReasonsWsDTOprotected StockLevelSearchPageWsDtoprotected WarehouseWsDtogetWarehouseByDefault(String code) protected WarehouseSearchPageWsDtogetWarehouseForPointOfServiceByDefault(String pointOfService) protected javax.ws.rs.core.ResponsemanuallyReleasePaymentCaptureRestCall(String consignmentCode) protected javax.ws.rs.core.ResponsemanuallyReleaseTaxCommitRestCall(String consignmentCode) protected javax.ws.rs.core.Responseprotected javax.ws.rs.core.ResponsepostAsnByDefault(AsnWsDTO newAsn) protected <T> javax.ws.rs.core.ResponsepostBodySecuredRestCall(String path, String username, String password, T requestBodyWsDTO) this method is to build the rest call with body for post with the return type Responseprotected javax.ws.rs.core.ResponsepostConfirmAsnReceiptByDefault(String asnInternalId) protected <S,T> T postDefaultSecuredRestCall(String path, String username, String password, String fields, S requestBodyWsDTO, Class<T> responseType) this method is to build the rest call post with the return typeprotected <T> javax.ws.rs.core.ResponsepostDefaultSecuredRestCall(String path, String username, String password, String fields, T requestBodyWsDTO) Builds a secured POST rest call.protected javax.ws.rs.core.ResponsepostEmptyBodySecuredRestCall(String path, String username, String password) this method is to build the rest call with null body for post with the return type Responseprotected javax.ws.rs.core.ResponsepostPackConsignmentDefault(String consignmentCode) protected javax.ws.rs.core.ResponsepostPackConsignmentWithPrintSlip(String consignmentCode, String username, String password, String printSlip) protected javax.ws.rs.core.ResponsepostPickConsignmentDefault(String consignmentCode) protected javax.ws.rs.core.ResponsepostPickConsignmentWithPrintSlip(String consignmentCode, String username, String password, String printSlip) protected javax.ws.rs.core.ResponsepostPutOrderOnHold(String orderCode) protected javax.ws.rs.core.ResponsepostResourceOrder(String orderCode) protected StockLevelAdjustmentsWsDTOpostStockLevelAdjustmentByDefault(String productCode, String warehouseCode, StockLevelAdjustmentsWsDTO stockLevelAdjustmentsWsDTO) protected javax.ws.rs.core.ResponsepostStockLevelAdjustmentByDefault_Reponse(String productCode, String warehouseCode, StockLevelAdjustmentsWsDTO stockLevelAdjustmentsWsDTO) protected javax.ws.rs.core.ResponsepostStockLevelByDefault(StockLevelWsDto newStock) protected StockLevelWsDtoprotected PaymentTransactionEntryWsDTOpostTakePaymentRestCall(String consignmentCode) protected PointOfServiceWsDTOpostUpdatePointOfServiceWarehouses(String name, WarehouseCodesWsDto warehouseCodesWsDTO) protected <S,T> T putDefaultSecuredRestCall(String path, String username, String password, String fields, S requestBodyWsDTO, Class<T> responseType) Builds a PUT rest callprotected PointOfServiceWsDTOputUpdatePointOfServiceAddress(String pointOfService, AddressWsDTO addressWsDTO) protected voidsaveAll()Saves any unsaved models.voidsetBusinessProcessService(BusinessProcessService businessProcessService) voidsetModelService(ModelService modelService) voidsetReturnCallbackService(ReturnCallbackService returnCallbackService) voidsetup()protected voidstartConsignmentProcess(ConsignmentModel consignment) Stars a business process for the givenConsignmentModelprotected ConsignmentWsDTOupdatePackagingInfoByDefault(String code, PackagingInfoWsDTO packagingInfoWsDTO) protected voidwaitForReturnProcessComplete(Collection<ReturnProcessModel> returnProcessModels) Waits for the process to complete before the time out.Methods inherited from class de.hybris.platform.warehousingwebservices.warehousingwebservices.util.BaseWebservicesIntegrationTest
getEnumerationService, getWsSecuredRequestBuilder, setEnumerationServiceMethods 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:
-
STOCKLEVELS
- See Also:
-
ASNS
- See Also:
-
WAREHOUSE_AGENT_USERNAME
- See Also:
-
WAREHOUSE_AGENT_PASSWORD
- See Also:
-
DEFAULT_CLIENT_ID
- See Also:
-
DEFAULT_CLIENT_SECRET
- See Also:
-
sourcingService
-
modelService
-
orders
-
baseStores
-
warehouses
-
addresses
-
stockLevels
-
pointsOfService
-
products
-
allocationService
-
warehousingReturnService
-
businessProcessService
-
users
-
deliveryModes
-
eventService
-
returnCallbackService
-
baseSites
-
components
-
commentTypes
-
flexibleSearchService
-
-
Constructor Details
-
BaseWarehousingWebservicesIntegrationTest
public BaseWarehousingWebservicesIntegrationTest()
-
-
Method Details
-
setup
public void setup() -
saveAll
protected void saveAll()Saves any unsaved models. -
cleanUpData
protected void cleanUpData() -
cleanUpModel
-
getStockLevelsForWarehouseCodeByDefault
-
getAllWarehousesByDefault
-
getAllConsignmentsByDefault
-
getWarehouseByDefault
-
getConsignmentsForCodeByDefault
-
getConsignmentStatusByDefault
-
getDeclineReasonsByDefault
-
getConsignmentEntriesByDefault
-
getSourcingLocationsByDefault
-
getPointOfServiceByDefault
-
getWarehouseForPointOfServiceByDefault
-
postUpdatePointOfServiceWarehouses
protected PointOfServiceWsDTO postUpdatePointOfServiceWarehouses(String name, WarehouseCodesWsDto warehouseCodesWsDTO) -
deleteWarehousesFromPointOfService
-
putUpdatePointOfServiceAddress
protected PointOfServiceWsDTO putUpdatePointOfServiceAddress(String pointOfService, AddressWsDTO addressWsDTO) -
postAcceptGoodsByDefault
-
postStockLevelByDefault
-
postAsnByDefault
-
postConfirmAsnReceiptByDefault
-
postStockLevelAdjustmentByDefault_Reponse
protected javax.ws.rs.core.Response postStockLevelAdjustmentByDefault_Reponse(String productCode, String warehouseCode, StockLevelAdjustmentsWsDTO stockLevelAdjustmentsWsDTO) -
postStockLevelAdjustmentByDefault
protected StockLevelAdjustmentsWsDTO postStockLevelAdjustmentByDefault(String productCode, String warehouseCode, StockLevelAdjustmentsWsDTO stockLevelAdjustmentsWsDTO) -
postStockLevelByDefault_WithReturnType_StockLevelWsDto
protected StockLevelWsDto postStockLevelByDefault_WithReturnType_StockLevelWsDto(StockLevelWsDto newStock) -
getStockLevelAdjustmentReasons
-
getPackagingInfoByDefault
-
updatePackagingInfoByDefault
protected ConsignmentWsDTO updatePackagingInfoByDefault(String code, PackagingInfoWsDTO packagingInfoWsDTO) -
postResourceOrder
-
postPutOrderOnHold
-
postPackConsignmentDefault
-
postPackConsignmentWithPrintSlip
-
postPickConsignmentDefault
-
postPickConsignmentWithPrintSlip
-
postTakePaymentRestCall
-
manuallyReleasePaymentCaptureRestCall
-
manuallyReleaseTaxCommitRestCall
-
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:
- the result 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
-
postDefaultSecuredRestCall
protected <S,T> T postDefaultSecuredRestCall(String path, String username, String password, String fields, S requestBodyWsDTO, Class<T> responseType) this method is to build the rest call post with the return type- Type Parameters:
T- the current dto which is to be updatedT-- Parameters:
path- the url for the callusername- the username used for authenticationpassword- the password used for authenticationfields- contains pagination informationresponseType- type of class to return- Returns:
- the request class to return after the execution of the call
-
postEmptyBodySecuredRestCall
protected javax.ws.rs.core.Response postEmptyBodySecuredRestCall(String path, String username, String password) this method is to build the rest call with null body for post with the return type Response- Parameters:
path- the url for the callusername- the username used for authenticationpassword- the password used for authentication- Returns:
Responsethe result of the call
-
postBodySecuredRestCall
protected <T> javax.ws.rs.core.Response postBodySecuredRestCall(String path, String username, String password, T requestBodyWsDTO) this method is to build the rest call with body for post with the return type Response- Parameters:
path- the url of the callusername- the username used for authenticationpassword- the password used for authenticationrequestBodyWsDTO- the request body- Returns:
Responsethe result of the call
-
getEmptySecuredRestCall
protected javax.ws.rs.core.Response getEmptySecuredRestCall(String path, String username, String password) this method is to build the rest call with null body for get with the return type Response- Parameters:
path- the url for the callusername- the username used for authenticationpassword- the password used for authentication- Returns:
Response
-
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
-
deleteDefaultSecuredRestCall
protected javax.ws.rs.core.Response deleteDefaultSecuredRestCall(String path, String username, String password, String fields) Builds a DELETE rest call- Parameters:
path- the url for the callusername- the username used for authenticationpassword- the password used for authenticationfields- contains pagination information- 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
-
createShippedConsignmentAndOrder
Creates a default order and consignment.- Returns:
- OrderModel the newly created order
-
createFailedSourcedOrder
Creates an order that fails sourcing.- Returns:
OrderModelthat failed sourcing
-
startConsignmentProcess
Stars a business process for the givenConsignmentModel- Parameters:
consignment- theConsignmentModelfor which a process will be started
-
createApprovedReturnRequest
Creates a default return request and approves it.- Parameters:
order- the order with which to create the return request- Returns:
- RefundEntryModel the created refund entry
-
waitForReturnProcessComplete
Waits for the process to complete before the time out.- Parameters:
returnProcessModels- a collection of return processes
-
createUsAddress
Creates a US address.- Returns:
- the newly created address
-
createPackagingInfo
protected PackagingInfoWsDTO createPackagingInfo(String width, String height, String length, String grossWeight, String insuredValue, String dimensionUnit, String weightUnit) Creates a new packaging information for a consignment with the given attributes.- Parameters:
width- the width of the packageheight- the height of the packagelength- the length of the packagegrossWeight- the gross weight of the packageinsuredValue- the insured value of the packagedimensionUnit- the dimension unit of the packageweightUnit- the weight unit of the package- Returns:
- the new
PackagingInfoWsDTO
-
createConsignmentReallocationWsDTO
Creates aConsignmentReallocationWsDTO- Returns:
- the newly created
ConsignmentReallocationWsDTO
-
createReturnAndReadyToAcceptGoods
Creates a return request in aReturnStatus.WAIT.- Returns:
- RefundEntryModel the created return request
-
getEventService
-
getReturnCallbackService
-
setReturnCallbackService
-
getModelService
-
setModelService
-
getBusinessProcessService
-
setBusinessProcessService
-