示例#1
0
        public void CanWriteDiagnosticMessageWithEventID()
        {
            var testableLogger = new TestableLogger();

            testableLogger.TraceToDeveloper("Message", 99);

            Assert.AreEqual("Message", testableLogger.Message);
            Assert.AreEqual(null, testableLogger.Category);
            Assert.AreEqual(99, testableLogger.EventID);
            Assert.AreEqual(TraceSeverity.Medium, testableLogger.TraceSeverity);
        }
示例#2
0
        public void CanWriteDiagnosticMessageWithSingleCategory()
        {
            var testableLogger = new TestableLogger();

            testableLogger.TraceToDeveloper("Message", "Category");

            Assert.AreEqual("Message", testableLogger.Message);
            Assert.AreEqual("Category", testableLogger.Category);
            Assert.AreEqual(0, testableLogger.EventID);
            Assert.AreEqual(TraceSeverity.Medium, testableLogger.TraceSeverity);
        }