Package com.hybris.cis.client.mock
Class ShippingClientMock
- java.lang.Object
-
- com.hybris.cis.client.mock.SharedClientMock
-
- com.hybris.cis.client.mock.ShippingClientMock
-
- All Implemented Interfaces:
CisClient,ShippingClient
public class ShippingClientMock extends SharedClientMock implements ShippingClient
Mock implementation ofShippingClient
-
-
Field Summary
-
Fields inherited from class com.hybris.cis.client.mock.SharedClientMock
PING_FAIL
-
-
Constructor Summary
Constructors Constructor Description ShippingClientMock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CisShipmentcreateShipment(java.lang.String xClientRef, java.lang.String tenantId, CisShipment cisShipment)Creates a test shipment.byte[]getLabel(java.lang.String xClientRef, java.lang.String tenantId, java.lang.String shipmentId, java.lang.String labelId)Returns a test stream for gathering the label.-
Methods inherited from class com.hybris.cis.client.mock.SharedClientMock
createRawResponseWithStatus, doPing
-
-
-
-
Method Detail
-
createShipment
public CisShipment createShipment(@HeaderParam("X-CIS-Client-ref") java.lang.String xClientRef, @HeaderParam("X-tenantId") java.lang.String tenantId, CisShipment cisShipment)
Creates a test shipment.- Specified by:
createShipmentin interfaceShippingClient- Parameters:
xClientRef- client ref to pass in the headertenantId- tenantId to pass in the headercisShipment- a shipment for testing purposes- Returns:
- a shipment with id 123 and tracking number 456, vendor name 123 and an empty list for labels
-
getLabel
public byte[] getLabel(@HeaderParam("X-CIS-Client-ref") java.lang.String xClientRef, @HeaderParam("X-tenantId") java.lang.String tenantId, java.lang.String shipmentId, java.lang.String labelId)Returns a test stream for gathering the label.- Specified by:
getLabelin interfaceShippingClient- Parameters:
xClientRef- client ref to pass in the headertenantId- tenantId to pass in the headershipmentId- the shipment idlabelId- the label id- Returns:
- a ByteArray with a text
-
-