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);
        }
Exemple #2
0
 public void DoSomethingTest()
 {
     _decorated.DoSomething(5);
     AssertLog("DoSomething called", "DoSomething completed");
 }