Class BaseWarehousingWebservicesIntegrationTest

All Implemented Interfaces:
JaloSessionHolder
Direct Known Subclasses:
AsnsControllerIntegrationTest, BaseStoresControllerIntegrationTest, ConsignmentsControllerIntegrationTest, OrdersControllerIntegrationTest, PointOfServicesControllerIntegrationTest, ReturnsControllerIntegrationTest, StockLevelsControllersIntegrationTest, WarehousesControllerIntegrationTest

@IntegrationTest public class BaseWarehousingWebservicesIntegrationTest extends BaseWebservicesIntegrationTest
  • Field Details

  • Constructor Details

    • BaseWarehousingWebservicesIntegrationTest

      public BaseWarehousingWebservicesIntegrationTest()
  • Method Details

    • setup

      public void setup()
    • saveAll

      protected void saveAll()
      Saves any unsaved models.
    • cleanUpData

      protected void cleanUpData()
    • cleanUpModel

      protected void cleanUpModel(String modelName)
    • getStockLevelsForWarehouseCodeByDefault

      protected StockLevelSearchPageWsDto getStockLevelsForWarehouseCodeByDefault(String code)
    • getAllWarehousesByDefault

      protected WarehouseSearchPageWsDto getAllWarehousesByDefault()
    • getAllConsignmentsByDefault

      protected ConsignmentSearchPageWsDto getAllConsignmentsByDefault()
    • getWarehouseByDefault

      protected WarehouseWsDto getWarehouseByDefault(String code)
    • getConsignmentsForCodeByDefault

      protected ConsignmentWsDTO getConsignmentsForCodeByDefault(String code)
    • getConsignmentStatusByDefault

      protected ConsignmentStatusListWsDTO getConsignmentStatusByDefault()
    • getDeclineReasonsByDefault

      protected DeclineReasonListWsDTO getDeclineReasonsByDefault()
    • getConsignmentEntriesByDefault

      protected ConsignmentEntrySearchPageWsDto getConsignmentEntriesByDefault(String code)
    • getSourcingLocationsByDefault

      protected WarehouseSearchPageWsDto getSourcingLocationsByDefault(String code)
    • getPointOfServiceByDefault

      protected PointOfServiceWsDTO getPointOfServiceByDefault(String name)
    • getWarehouseForPointOfServiceByDefault

      protected WarehouseSearchPageWsDto getWarehouseForPointOfServiceByDefault(String pointOfService)
    • postUpdatePointOfServiceWarehouses

      protected PointOfServiceWsDTO postUpdatePointOfServiceWarehouses(String name, WarehouseCodesWsDto warehouseCodesWsDTO)
    • deleteWarehousesFromPointOfService

      protected javax.ws.rs.core.Response deleteWarehousesFromPointOfService(String name, String warehouseCode)
    • putUpdatePointOfServiceAddress

      protected PointOfServiceWsDTO putUpdatePointOfServiceAddress(String pointOfService, AddressWsDTO addressWsDTO)
    • postAcceptGoodsByDefault

      protected javax.ws.rs.core.Response postAcceptGoodsByDefault(String code)
    • postStockLevelByDefault

      protected javax.ws.rs.core.Response postStockLevelByDefault(StockLevelWsDto newStock)
    • postAsnByDefault

      protected javax.ws.rs.core.Response postAsnByDefault(AsnWsDTO newAsn)
    • postConfirmAsnReceiptByDefault

      protected javax.ws.rs.core.Response postConfirmAsnReceiptByDefault(String asnInternalId)
    • 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

      protected StockLevelAdjustmentReasonsWsDTO getStockLevelAdjustmentReasons()
    • getPackagingInfoByDefault

      protected PackagingInfoWsDTO getPackagingInfoByDefault(String code)
    • updatePackagingInfoByDefault

      protected ConsignmentWsDTO updatePackagingInfoByDefault(String code, PackagingInfoWsDTO packagingInfoWsDTO)
    • postResourceOrder

      protected javax.ws.rs.core.Response postResourceOrder(String orderCode)
    • postPutOrderOnHold

      protected javax.ws.rs.core.Response postPutOrderOnHold(String orderCode)
    • postPackConsignmentDefault

      protected javax.ws.rs.core.Response postPackConsignmentDefault(String consignmentCode)
    • postPackConsignmentWithPrintSlip

      protected javax.ws.rs.core.Response postPackConsignmentWithPrintSlip(String consignmentCode, String username, String password, String printSlip)
    • postPickConsignmentDefault

      protected javax.ws.rs.core.Response postPickConsignmentDefault(String consignmentCode)
    • postPickConsignmentWithPrintSlip

      protected javax.ws.rs.core.Response postPickConsignmentWithPrintSlip(String consignmentCode, String username, String password, String printSlip)
    • postTakePaymentRestCall

      protected PaymentTransactionEntryWsDTO postTakePaymentRestCall(String consignmentCode)
    • manuallyReleasePaymentCaptureRestCall

      protected javax.ws.rs.core.Response manuallyReleasePaymentCaptureRestCall(String consignmentCode)
    • manuallyReleaseTaxCommitRestCall

      protected javax.ws.rs.core.Response manuallyReleaseTaxCommitRestCall(String consignmentCode)
    • 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 call
      username - the username used for authentication
      password - the password used for authentication
      fields - contains pagination information
      currentPage - the current page of the request
      pageSize - total page size
      responseType - 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 call
      username - the username used for authentication
      password - the password used for authentication
      fields - contains pagination information
      requestBodyWsDTO - 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 updated
      T -
      Parameters:
      path - the url for the call
      username - the username used for authentication
      password - the password used for authentication
      fields - contains pagination information
      responseType - 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 call
      username - the username used for authentication
      password - the password used for authentication
      Returns:
      Response the 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 call
      username - the username used for authentication
      password - the password used for authentication
      requestBodyWsDTO - the request body
      Returns:
      Response the 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 call
      username - the username used for authentication
      password - 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 call
      username - the username used for authentication
      password - the password used for authentication
      fields - contains pagination information
      requestBodyWsDTO - the current dto which is to be updated
      responseType - 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 call
      username - the username used for authentication
      password - the password used for authentication
      fields - 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 first ErrorWsDTO content of the ErrorListWsDTO of the bad request
      Parameters:
      response - bad request response
      errorReason - error reason
      errorSubject - error subject
      ErrorSubjectType - error subject type
    • createShippedConsignmentAndOrder

      protected OrderModel createShippedConsignmentAndOrder()
      Creates a default order and consignment.
      Returns:
      OrderModel the newly created order
    • createFailedSourcedOrder

      protected OrderModel createFailedSourcedOrder()
      Creates an order that fails sourcing.
      Returns:
      OrderModel that failed sourcing
    • startConsignmentProcess

      protected void startConsignmentProcess(ConsignmentModel consignment)
      Stars a business process for the given ConsignmentModel
      Parameters:
      consignment - the ConsignmentModel for which a process will be started
    • createApprovedReturnRequest

      protected RefundEntryModel createApprovedReturnRequest(OrderModel order)
      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

      protected void waitForReturnProcessComplete(Collection<ReturnProcessModel> returnProcessModels)
      Waits for the process to complete before the time out.
      Parameters:
      returnProcessModels - a collection of return processes
    • createUsAddress

      protected AddressWsDTO 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 package
      height - the height of the package
      length - the length of the package
      grossWeight - the gross weight of the package
      insuredValue - the insured value of the package
      dimensionUnit - the dimension unit of the package
      weightUnit - the weight unit of the package
      Returns:
      the new PackagingInfoWsDTO
    • createConsignmentReallocationWsDTO

      protected ConsignmentReallocationWsDTO createConsignmentReallocationWsDTO()
      Returns:
      the newly created ConsignmentReallocationWsDTO
    • createReturnAndReadyToAcceptGoods

      protected RefundEntryModel createReturnAndReadyToAcceptGoods()
      Creates a return request in a ReturnStatus.WAIT.
      Returns:
      RefundEntryModel the created return request
    • getEventService

      public EventService getEventService()
    • getReturnCallbackService

      public ReturnCallbackService getReturnCallbackService()
    • setReturnCallbackService

      public void setReturnCallbackService(ReturnCallbackService returnCallbackService)
    • getModelService

      public ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)
    • getBusinessProcessService

      public BusinessProcessService getBusinessProcessService()
    • setBusinessProcessService

      public void setBusinessProcessService(BusinessProcessService businessProcessService)