public void WhenMessageToStringInvoked_ThenContainsEventTypeAndMessage() { var traceEvent = new MessageTraceEvent(TraceEventType.Information, 0, "Foo", new object[0]); Assert.Contains(TraceEventType.Information.ToString(), traceEvent.ToString()); Assert.Contains("Foo", traceEvent.ToString()); }
public void WhenMessageWithFormatToStringInvoked_ThenContainsEventTypeAndFormattedMessge() { var traceEvent = new MessageTraceEvent(TraceEventType.Information, 0, "Hello {0}", "World"); Assert.Contains("Hello World", traceEvent.ToString()); }