public void RenderEvents_OneEventInList_PrintCalledOnce() { //Test is done with seperation events, since the _isRaised-attribute of //TrackEnteredEvent and TrackLeftEvent goes false after a set amount of time, introducing possible errors List <TrackData> tracks = new List <TrackData>(); tracks.Add(td1); tracks.Add(td2); SeperationEvent se1 = new SeperationEvent(timeStamp, tracks, 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(); //Check that Print was called only once fakeConsoleOutput.ReceivedWithAnyArgs().Print("Any string"); }