Exemplo n.º 1
0
        public void AddTrackLeftEventFor(TrackData td, IFileOutput logger)
        {
            TrackLeftEvent tle = new TrackLeftEvent(td.TimeStamp, td, true, td.ConsoleOutput, logger);

            events.Add(tle);
            logger.Write(tle.FormatData());
        }
Exemplo n.º 2
0
        public void RenderEvents_TrackLeftEventInList_CorrectStringPrinted()
        {
            TrackLeftEvent se1 = new TrackLeftEvent(timeStamp, td1, false, fakeConsoleOutput, fakeFileOutput);

            uut.events.Add(se1);

            string expectedString = se1.FormatData();

            //Console output did not receive anything before rendering
            fakeConsoleOutput.DidNotReceiveWithAnyArgs().Print("Any string");

            uut.RenderEvents();

            //Console output received the expected string
            fakeConsoleOutput.Received().Print(Arg.Is <string>(str => str.Contains(expectedString)));
        }
        public void TrackLeftEventFormatData_isCalled_ReturnsCorrectString()
        {
            string expectedString = "Track left airspace - Occurencetime: 235928121999 Involved track: ABC123";

            Assert.That(() => uut_tle.FormatData().Equals(expectedString));
        }