public void EmailTraceListener_Unit_Write_Optimal() { using (MockEmailTraceListener target = new MockEmailTraceListener()) { String message = "This is a test."; target.Write(message); IEnumerable<String> lines = target.LinesDerived; Assert.AreEqual(0, lines.Count()); } }
public void EmailTraceListener_Unit_Write_CalledTwice() { using (MockEmailTraceListener target = new MockEmailTraceListener()) { String message1 = "This is a test."; target.Write(message1); String message2 = "This is another test."; target.Write(message2); IEnumerable<String> lines = target.LinesDerived; Assert.AreEqual(0, lines.Count()); } }