public void WriteLineHappyPath2() { var mockLogger = new MockLogger(LogLevel.Warn); var listener = new LoggingTraceListener(mockLogger.Object, LogLevel.Info); listener.WriteLine("Hello, world!"); mockLogger.VerifyInfo(Times.Never()); }
public void WriteLineHappyPath1() { var mockLogger = new MockLogger(); var listener = new LoggingTraceListener(mockLogger.Object, LogLevel.Info); listener.WriteLine("Hello, world!"); mockLogger.VerifyInfo("^Hello, world!$", Times.Once()); }