public void testOnHandling() { Delivery delivery = Delivery.BeforeHandling(); HandlingActivity load = HandlingActivity.LoadOnto(V.HONGKONG_TO_NEW_YORK).In(L.HONGKONG); delivery = delivery.OnHandling(load); Assert.That(delivery.MostRecentHandlingActivity, Is.EqualTo(load)); Assert.That(delivery.MostRecentPhysicalHandlingActivity, Is.EqualTo(load)); HandlingActivity customs = HandlingActivity.CustomsIn(L.NEWYORK); delivery = delivery.OnHandling(customs); Assert.That(delivery.MostRecentHandlingActivity, Is.EqualTo(customs)); Assert.That(delivery.MostRecentPhysicalHandlingActivity, Is.EqualTo(load)); HandlingActivity loadAgain = HandlingActivity.LoadOnto(V.NEW_YORK_TO_DALLAS).In(L.NEWYORK); delivery = delivery.OnHandling(loadAgain); Assert.That(delivery.MostRecentHandlingActivity, Is.EqualTo(loadAgain)); Assert.That(delivery.MostRecentPhysicalHandlingActivity, Is.EqualTo(loadAgain)); }
protected void setUp() { routeSpecification = new RouteSpecification(L.HANGZOU, L.STOCKHOLM, DateTime.Parse("2008-11-03")); itinerary = new Itinerary( Leg.DeriveLeg(V.HONGKONG_TO_NEW_YORK, L.HANGZOU, L.NEWYORK), Leg.DeriveLeg(V.NEW_YORK_TO_DALLAS, L.NEWYORK, L.DALLAS), Leg.DeriveLeg(V.DALLAS_TO_HELSINKI, L.DALLAS, L.STOCKHOLM)); delivery = Delivery.BeforeHandling(); Thread.Sleep(1); }