public void DoSomethingTest() { _decorated.DoSomething(5); Assert.AreEqual(2, _log.Count); var entry = _log.Dequeue(); Assert.AreEqual(LogLevel.Information, entry.LogLevel); Assert.AreEqual("Calling DoSomething(5, theDefault).", entry.Message); AssertStartsWith("DoSomething completed in duration", _log.Dequeue().Message); _decorated.DoSomething(5, null); Assert.AreEqual("Calling DoSomething(5, (null)).", _log.Dequeue().Message); }
public void DoSomethingTest() { _decorated.DoSomething(5); AssertLog("DoSomething called", "DoSomething completed"); }