示例#1
0
 public static Package CreatePickup(string postal)
 {
     return(new Package
     {
         Airbill = AirBillGenerator.Create(),
         Origin = AddressGenerator.Create(postal),
         Destination = AddressGenerator.Create(),
         Service = Service,
         Recipient = CreateContact(),
         Shipper = CreateContact(),
         Dimensions = Dimension
     });
 }
示例#2
0
 public static Package Create()
 {
     return(new Package
     {
         Airbill = AirBillGenerator.Create(),
         Origin = AddressGenerator.Create(),
         Destination = AddressGenerator.Create(),
         Service = Service,
         Dimensions = Dimension,
         Signature = Signature,
         Recipient = CreateContact(),
         Shipper = CreateContact()
     });
 }
示例#3
0
        public static Region Create(string regionName, string regionSymbol)
        {
            var routes = AddressGenerator.Postals.Select(postal => RouteGenerator.Create(postal, 20, 20)).ToList();

            var region = new Region
            {
                Name   = regionName,
                Symbol = regionSymbol,
                Hub    = AddressGenerator.Create(),
            };

            var onCall = OnCalls;

            region.Routes.TryAdd(onCall.Symbol, onCall);

            foreach (var route in routes)
            {
                region.Routes.TryAdd(route.Symbol, route);
            }

            return(region);
        }