Example #1
0
        public void Logging_ExtensionTest_InfoE()
        {
            var logger = new TestLogger();

            logger.LogInfo(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.Information);
            logger.Last.Message.ToString().Should().Be("message a b.");
        }
Example #2
0
        public void Logging_ExtensionTest_InfoC()
        {
            var logger = new TestLogger();

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

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

            logger.LogInfo("some message.");

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

            logger.LogInfo(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.Information);
            logger.Last.Message.ToString().Should().Be("message a b.");
        }
Example #5
0
        public void Logging_ExtensionTest_InfoC()
        {
            var logger = new TestLogger();

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

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

            logger.LogInfo("some message.");

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