public void warning_with_exception() { var sut = new BaseLoggerWrapper(GetType()); sut.Warning("Hello", new ExternalException()); Assert.AreEqual(sut.Entries.Count, 1); Assert.AreEqual(sut.Entries[0].Message, "Hello"); Assert.AreEqual(sut.Entries[0].LogLevel, LogLevel.Warning); Assert.IsInstanceOfType(sut.Entries[0].Exception, typeof(ExternalException)); }
public void warning_formatted() { var sut = new BaseLoggerWrapper(GetType()); sut.Warning("Hello {0}", "World"); Assert.AreEqual(sut.Entries.Count, 1); Assert.AreEqual(sut.Entries[0].Message, "Hello World"); Assert.AreEqual(sut.Entries[0].LogLevel, LogLevel.Warning); Assert.AreEqual(sut.Entries[0].Exception, null); }
public void warning_without_exception() { var sut = new BaseLoggerWrapper(GetType()); sut.Warning("Hello"); Assert.AreEqual(sut.Entries.Count, 1); Assert.AreEqual(sut.Entries[0].Message, "Hello"); Assert.AreEqual(sut.Entries[0].LogLevel, LogLevel.Warning); Assert.AreEqual(sut.Entries[0].Exception, null); }