public void Setup() { _uut = new TrackLeftAirspace(_atmLog = Substitute.For<IATMLogEvent>()); _atmTransponderData1 = Substitute.For<IATMTransponderData>(); _atmTransponderData2 = Substitute.For<IATMTransponderData>(); _atmTransponderData1.Tag = "item1"; _atmTransponderData1.Timestamp = "20151103180445769"; _atmTransponderData2.Tag = "item2"; }
public void EventHandler_Logging_TrackLeftAirspaceEvent() { File.WriteAllText(@"ATMLogger.txt", "Cleared"); var trackLeftAirspace = new TrackLeftAirspace(); var atmEventHandler = new ATMEventHandler(new List<ATMWarning> { _separation }, new List<ATMNotification> { _trackEnteredAirspace, trackLeftAirspace }); atmEventHandler.Handle(new List<IATMTransponderData> { new ATMTransponderData("EventHandler_Log_TrackLeftAirspaceEventTest", 17650, 29874, 5000, "2015") }); atmEventHandler.Handle(new List<IATMTransponderData>()); var fileConsistOurString = (File.ReadLines(@"ATMLogger.txt").Last()).Contains("EventHandler_Log_TrackLeftAirspaceEventTest"); Assert.IsTrue(fileConsistOurString); }
public void Setup() { _trackEnteredAirspace = new TrackEnteredAirspace(Substitute.For<IATMLogEvent>()); _trackLeftAirspace = new TrackLeftAirspace(Substitute.For<IATMLogEvent>()); }
public void Setup() { _atmLogEvent = Substitute.For<IATMLogEvent>(); _separation = new Separation(_atmLogEvent); _trackEnteredAirspace = new TrackEnteredAirspace(_atmLogEvent); _trackLeftAirspace = new TrackLeftAirspace(_atmLogEvent); _atmEventHandler = new ATMEventHandler(new List<ATMWarning> { _separation }, new List<ATMNotification> { _trackEnteredAirspace, _trackLeftAirspace }); }