public void PassesThroughFatal() { string message = "a message"; MockLog log = new MockLog(); ProxyLog tested = new ProxyLog(log); tested.Fatal(message); Assert.IsTrue(log.Any(x => x.Level == MockLog.Level.Fatal && x.Message == message)); }
public void PassesThroughFormattedFatal() { string format = "message {0}"; string arg = "arg"; var formatProvider = CultureInfo.InvariantCulture; MockLog log = new MockLog(); ProxyLog tested = new ProxyLog(log); tested.Fatal(formatProvider, format, arg); Assert.IsTrue(log.Any(x => x.Level == MockLog.Level.Fatal && x.Message == string.Format(formatProvider, format, arg))); }