public void should_the_same_handling_activities()
        {
            var voyage = new VoyageBuilder(new VoyageNumber("VOY01"),
                                           new BookingApi.Domain.Location.Location(UnLocodeHelpers.GetNewUnLocode(), "CHICAGO"))
                                           .AddMovement(new BookingApi.Domain.Location.Location(UnLocodeHelpers.GetNewUnLocode(), "HAMBOURG"), DateTime.Now, DateTime.Now)
                                           .Build();
            var chicago = new BookingApi.Domain.Location.Location(UnLocodeHelpers.GetNewUnLocode(), "CHICAGO");

            var firstHandlingActivity = new HandlingActivity(HandlingEventType.Load, chicago, voyage);
            var secondHandlingActivity = new HandlingActivity(HandlingEventType.Load, chicago, voyage);

            Assert.Equal(firstHandlingActivity, secondHandlingActivity);
        }
Example #2
0
		private Delivery(HandlingEvent lastHandlingEvent, Itinerary itinerary, RouteSpecification specification)
		{
			_calculatedAt = DateTime.Now;
			_lastEvent = lastHandlingEvent;

			_misdirected = CalculateMisdirectionStatus(itinerary);
			_routingStatus = CalculateRoutingStatus(itinerary, specification);
			_transportStatus = CalculateTransportStatus();
			_lastKnownLocation = CalculateLastKnownLocation();
			_currentVoyage = CalculateCurrentVoyage();
			_eta = CalculateEta(itinerary);
			_nextExpectedActivity = CalculateNextExpectedActivity(specification, itinerary);
			_isUnloadedAtDestination = CalculateUnloadedAtDestination(specification);
		}