Beispiel #1
0
        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());
        }
Beispiel #2
0
        public void WhenMessageWithFormatToStringInvoked_ThenContainsEventTypeAndFormattedMessge()
        {
            var traceEvent = new MessageTraceEvent(TraceEventType.Information, 0, "Hello {0}", "World");

            Assert.Contains("Hello World", traceEvent.ToString());
        }