Beispiel #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));
      }
Beispiel #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));
      }
Beispiel #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));
      }
Beispiel #4
0
 private bool CalculateMisdirectionStatus(Itinerary itinerary)
 {
     if (LastEvent == null)
     {
         return(false);
     }
     return(!itinerary.IsExpected(LastEvent));
 }
Beispiel #5
0
 private static bool CalculateMisdirectionStatus(HandlingEvent lastEvent, Itinerary itinerary)
 {
     if (lastEvent == null)
     {
         return(false);
     }
     return(!itinerary.IsExpected(lastEvent));
 }
Beispiel #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));
      }
Beispiel #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));
      }
Beispiel #8
0
 private static bool CalculateMisdirectionStatus(HandlingEvent lastEvent, Itinerary itinerary)
 {
     if (lastEvent == null)
     {
         return false;
     }
     return !itinerary.IsExpected(lastEvent);
 }
Beispiel #9
0
 private bool CalculateMisdirectionStatus(Itinerary itinerary)
 {
    if (LastEvent == null)
    {
       return false;
    }
    return !itinerary.IsExpected(LastEvent);
 }