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