示例#1
0
        public void Logging_ExtensionTest_TraceE()
        {
            var logger = new TestLogger();

            logger.LogTrace(33, new InvalidCastException(), "message {0} {1}.", "a", "b");

            logger.Last.EventId.Should().Be(33);
            logger.Last.Exception.Should().BeOfType <InvalidCastException>();
            logger.Last.LogLevel.Should().Be(LogLevel.Trace);
            logger.Last.Message.ToString().Should().Be("message a b.");
        }
示例#2
0
        public void Logging_ExtensionTest_TraceC()
        {
            var logger = new TestLogger();

            logger.LogTrace(11, "message {0} {1}.", "a", "b");

            logger.Last.EventId.Should().Be(11);
            logger.Last.Exception.Should().BeNull();
            logger.Last.LogLevel.Should().Be(LogLevel.Trace);
            logger.Last.Message.ToString().Should().Be("message a b.");
        }
示例#3
0
        public void Logging_ExtensionTest_TraceA()
        {
            var logger = new TestLogger();

            logger.LogTrace("some message.");

            logger.Last.EventId.Should().Be(0);
            logger.Last.Exception.Should().BeNull();
            logger.Last.LogLevel.Should().Be(LogLevel.Trace);
            logger.Last.Message.ToString().Should().Be("some message.");
        }
示例#4
0
        public void Logging_ExtensionTest_TraceE()
        {
            var logger = new TestLogger();

            logger.LogTrace(33, new InvalidCastException(), "message {0} {1}.", "a", "b");

            logger.Last.EventId.Should().Be(33);
            logger.Last.Exception.Should().BeOfType<InvalidCastException>();
            logger.Last.LogLevel.Should().Be(LogLevel.Trace);
            logger.Last.Message.ToString().Should().Be("message a b.");
        }
示例#5
0
        public void Logging_ExtensionTest_TraceC()
        {
            var logger = new TestLogger();

            logger.LogTrace(11, "message {0} {1}.", "a", "b");

            logger.Last.EventId.Should().Be(11);
            logger.Last.Exception.Should().BeNull();
            logger.Last.LogLevel.Should().Be(LogLevel.Trace);
            logger.Last.Message.ToString().Should().Be("message a b.");
        }
示例#6
0
        public void Logging_ExtensionTest_TraceA()
        {
            var logger = new TestLogger();

            logger.LogTrace("some message.");

            logger.Last.EventId.Should().Be(0);
            logger.Last.Exception.Should().BeNull();
            logger.Last.LogLevel.Should().Be(LogLevel.Trace);
            logger.Last.Message.ToString().Should().Be("some message.");
        }