Пример #1
0
 public static JupiterVoyageRoute MakeJupiterVoyageRouteFromPorts(string originPortCode, string destinationPortCode, params string[] transhipmentPortCodes)
 {
     return(new JupiterVoyageRoute(null,
                                   new JupiterVoyageRoute.LoadLeg(originPortCode,
                                                                  DateTime.Today,
                                                                  DataProvider.Get <VesselReference>(),
                                                                  DataProvider.GetStringOfLength(6)),
                                   transhipmentPortCodes.Select(portCode => new TestObjectBuilder <JupiterVoyageRoute.TranshipmentLeg>()
                                                                .SetArgument(t => t.PortCode, portCode)
                                                                .SetArgument(t => t.Etd, null)
                                                                .SetArgument(t => t.Eta, null)
                                                                .SetArgument(t => t.Vessel, DataProvider.Get <VesselReference>())
                                                                .SetArgument(t => t.Voyage, DataProvider.GetStringOfLength(15))
                                                                .Build()),
                                   new JupiterVoyageRoute.DischargeLeg(destinationPortCode,
                                                                       DateTime.Today.AddDays(1)),
                                   null));
 }