Exemple #1
0
        internal static void AssertEqual(this ShipmentInformation expected, ISetShipmentInformationWithStatus setShipmentInformation)
        {
            if (expected == null)
            {
                throw new ArgumentNullException("expected");
            }

            expected.AssertEqual((ISetShipmentInformation)setShipmentInformation);
            if (setShipmentInformation == null)
            {
                Assert.AreEqual(ShipmentStatus.Unscheduled, expected.Status);
            }
            else
            {
                Assert.AreEqual(setShipmentInformation.ShipmentStatus, expected.Status);
            }
        }
        internal static void SetShipmentInformation(this ShipmentInformation shipmentInformation, ISetShipmentInformationWithStatus shipment)
        {
            if (shipmentInformation == null)
            {
                throw new ArgumentNullException("shipmentInformation");
            }

            shipmentInformation.SetShipmentInformation(shipment as ISetShipmentInformation);
            shipmentInformation.Status = shipment == null ? ShipmentStatus.Unscheduled : shipment.ShipmentStatus;
        }