Example #1
0
      public void IsExpected_ReceiveEvent_FirstLegLocationDoesntMatchEventLocation_False()
      {
         Itinerary itinerary = new Itinerary(new[] { new Leg(Krakow, DateTime.Now, Warszawa, DateTime.Now) });
         HandlingEvent @event = new HandlingEvent(HandlingEventType.Receive, Warszawa, DateTime.Now, DateTime.Now, null);

         Assert.IsFalse(itinerary.IsExpected(@event));
      }
Example #2
0
      public void IsExpected_ClaimEvent_Empty_False()
      {
         Itinerary itinerary = new Itinerary(new Leg[] { });
         HandlingEvent @event = new HandlingEvent(HandlingEventType.Claim, Krakow, DateTime.Now, DateTime.Now, null);

         Assert.IsFalse(itinerary.IsExpected(@event));
      }
Example #3
0
      public void IsExpected_ReceiveEvent_FirstLegLocationMathesEventLocation_True()
      {
         Itinerary itinerary = new Itinerary(new[]{new Leg(Krakow, DateTime.Now, Warszawa, DateTime.Now  )});
         HandlingEvent @event = new HandlingEvent(HandlingEventType.Receive, Krakow, DateTime.Now, DateTime.Now);

         Assert.IsTrue(itinerary.IsExpected(@event));
      }
Example #4
0
 private bool CalculateMisdirectionStatus(Itinerary itinerary)
 {
     if (LastEvent == null)
     {
         return(false);
     }
     return(!itinerary.IsExpected(LastEvent));
 }
Example #5
0
 private static bool CalculateMisdirectionStatus(HandlingEvent lastEvent, Itinerary itinerary)
 {
     if (lastEvent == null)
     {
         return(false);
     }
     return(!itinerary.IsExpected(lastEvent));
 }
Example #6
0
      public void IsExpected_ClainEvent_LastLegLocationDoesntMatchEventLocation_False()
      {
         Itinerary itinerary = new Itinerary(new[]
                                                {
                                                   new Leg(Krakow, DateTime.Now, Warszawa, DateTime.Now),
                                                   new Leg(Warszawa, DateTime.Now, Wroclaw, DateTime.Now)                                                   
                                                });
         HandlingEvent @event = new HandlingEvent(HandlingEventType.Claim, Warszawa, DateTime.Now, DateTime.Now, null);

         Assert.IsFalse(itinerary.IsExpected(@event));
      }
Example #7
0
      public void IsExpected_LoadEvent_NoLegLocationMathesEventLocation_True()
      {
         Itinerary itinerary = new Itinerary(new[]
                                                {
                                                   new Leg(Krakow, DateTime.Now, Warszawa, DateTime.Now),
                                                   new Leg(Warszawa, DateTime.Now, Wroclaw, DateTime.Now)                                                   
                                                });

         HandlingEvent @event = new HandlingEvent(HandlingEventType.Load, Wroclaw, DateTime.Now, DateTime.Now, null);

         Assert.IsFalse(itinerary.IsExpected(@event));
      }
Example #8
0
 private static bool CalculateMisdirectionStatus(HandlingEvent lastEvent, Itinerary itinerary)
 {
     if (lastEvent == null)
     {
         return false;
     }
     return !itinerary.IsExpected(lastEvent);
 }
Example #9
0
 private bool CalculateMisdirectionStatus(Itinerary itinerary)
 {
    if (LastEvent == null)
    {
       return false;
    }
    return !itinerary.IsExpected(LastEvent);
 }