public void EmailTraceListener_Unit_CreateMailBody_Optimal() { using (MockEmailTraceListener target = new MockEmailTraceListener()) { String message1 = "This is a test."; String message2 = "This is another test."; target.WriteLine(message1); target.WriteLine(message2); String actual = target.CreateMailBodyDerived(); StringAssert.Contains(actual, message1); StringAssert.Contains(actual, message2); } }
public void EmailTraceListener_Unit_CreateMailBody_HasNoLines() { using (MockEmailTraceListener target = new MockEmailTraceListener()) { String actual = target.CreateMailBodyDerived(); Assert.AreEqual(String.Empty, actual); } }