Ejemplo n.º 1
0
        private CargoDetails assembleFrom(Cargo cargo)
        {
            CargoDetails cargoDetails = new CargoDetails();

            cargoDetails.setTrackingId(cargo.TrackingId.Value);
            cargoDetails.setFinalDestination(cargo.RouteSpecification.Destination.Name);
            cargoDetails.setCurrentLocation(cargo.LastKnownLocation.Name);
            cargoDetails.setCurrentStatus(cargo.TransportStatus.ToString());
            return(cargoDetails);
        }
Ejemplo n.º 2
0
        public void reportCargoUpdate()
        {
            reportPusher.reportCargoUpdate(new TrackingId("ABC"));

            CargoDetails expected = new CargoDetails();

            expected.setTrackingId("ABC");
            expected.setCurrentLocation("Hongkong");
            expected.setFinalDestination("Rotterdam");
            expected.setCurrentStatus("IN_PORT");

            reportSubmission.AssertWasCalled(s => s.submitCargoDetails(Arg.Is(expected)));
        }