Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        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());
        }