Class ShippingClientMock

    • Constructor Detail

      • ShippingClientMock

        public ShippingClientMock()
    • 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:
        createShipment in interface ShippingClient
        Parameters:
        xClientRef - client ref to pass in the header
        tenantId - tenantId to pass in the header
        cisShipment - 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:
        getLabel in interface ShippingClient
        Parameters:
        xClientRef - client ref to pass in the header
        tenantId - tenantId to pass in the header
        shipmentId - the shipment id
        labelId - the label id
        Returns:
        a ByteArray with a text