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