Exemplo n.º 1
0
        public static Order SetsDestinationFromLastStop(CustomerRequestVO customerRequest, Order order)
        {
            // test 4/9, Create_SetsDestinationFromLastStop
            var destination = (from stop
                in customerRequest.Stops
                               select stop).OrderByDescending(x => x.StopNumber).Last();

            var address1 = new Address(destination.AddressLine1, destination.AddressLine2, destination.AddressCityName, destination.AddressStateCode, destination.AddressPostalCode);
            order.Origin = new Facility(destination.OrganizationName, address1);

            return order;
        }
Exemplo n.º 2
0
        public static Order SetsOrigin(CustomerRequestVO customerRequest, Order order)
        {
            // test 3/9 Create_SetsOriginFromFirstStop
            var origin = (from stop
                in customerRequest.Stops
                          select stop).OrderByDescending(x => x.StopNumber).First();

            var address = new Address(origin.AddressLine1, origin.AddressLine2, origin.AddressCityName, origin.AddressStateCode, origin.AddressPostalCode);
            order.Origin = new Facility(origin.OrganizationName, address);

            return order;
        }