public void LogFileNotCreated() { Listeners.IListener listener = new MockListener(); Viewers.IViewer viewer = new MockViewer(); SessionMonitor s = new SessionMonitor(listener, viewer); s.Start(); s.AddEvent(listener, "Some text"); s.Stop(); Assert.IsNull(s.logFileName); }
public void LogFileCreated() { Viewers.IViewer viewer = new MockViewer(); Listeners.IListener listener = new MockListener(); SessionMonitor s = new SessionMonitor(listener, viewer, "foo_log.txt"); s.Start(); s.AddEvent(listener, "Some text"); s.Stop(); Assert.IsTrue(System.IO.File.Exists(s.logFileName)); System.IO.File.Delete(s.logFileName); }