internal static void AssertEqual(this ShipmentInformation expected, ITransitInformation result) { if (expected == null) { throw new ArgumentNullException("expected"); } if (result == null) { Assert.IsNull(expected.FreightBillType); Assert.IsNull(expected.ShipmentMethod); Assert.IsNull(expected.DriverName); Assert.IsNull(expected.CarrierName); Assert.IsNull(expected.TrailerLicenseNumber); Assert.IsNull(expected.ContainerSeal); } else { Assert.AreEqual(result.FreightType, expected.FreightBillType); Assert.AreEqual(result.ShipmentMethod, expected.ShipmentMethod); Assert.AreEqual(result.DriverName, expected.DriverName); Assert.AreEqual(result.CarrierName, expected.CarrierName); Assert.AreEqual(result.TrailerLicenseNumber, expected.TrailerLicenseNumber); Assert.AreEqual(result.ContainerSeal, expected.ContainerSeal); } }
public static TransitViewModel Create(ITransitInformation source) { return(new TransitViewModel(source == null || ( source.CarrierName == null && source.ContainerSeal == null && source.DriverName == null && source.FreightType == null && source.TrailerLicenseNumber == null && source.ShipmentMethod == null))); }
public SetTransitInformationParameter(ITransitInformation transitInformation) { if (transitInformation != null) { FreightBillType = transitInformation.FreightType; DriverName = transitInformation.DriverName; CarrierName = transitInformation.CarrierName; TrailerLicenseNumber = transitInformation.TrailerLicenseNumber; ContainerSeal = transitInformation.ContainerSeal; } }
private static void SetTransitInformation(this ShipmentInformation shipmentInformation, ITransitInformation transitInformation) { if (transitInformation == null) { shipmentInformation.FreightBillType = null; shipmentInformation.DriverName = null; shipmentInformation.CarrierName = null; shipmentInformation.TrailerLicenseNumber = null; shipmentInformation.ContainerSeal = null; } else { shipmentInformation.FreightBillType = transitInformation.FreightType; shipmentInformation.DriverName = transitInformation.DriverName; shipmentInformation.CarrierName = transitInformation.CarrierName; shipmentInformation.TrailerLicenseNumber = transitInformation.TrailerLicenseNumber; shipmentInformation.ContainerSeal = transitInformation.ContainerSeal; } }