public void TestLoggingACustomLogEntry()
        {
            WmiTraceListener listener = new WmiTraceListener();
            MyCustomLogEntry logEntry = new MyCustomLogEntry();

            logEntry.MyName = "Enterprise Library Tester";
            SendLogEntry(listener, logEntry);
            Assert.IsTrue(wmiLogged);
            Assert.AreEqual(wmiLogEntry.GetPropertyValue("MyName"), logEntry.MyName);
        }
Example #2
0
        public void TestLoggingACustomLogEntry()
        {
            WmiTraceListener listener = new WmiTraceListener();

            MyCustomLogEntry logEntry = new MyCustomLogEntry();
            logEntry.MyName = "Enterprise Library Tester";
            SendLogEntry(listener, logEntry);

            Assert.IsTrue(this.wmiLogged);
            Assert.AreEqual(this.wmiLogEntry.GetPropertyValue("MyName"), logEntry.MyName);
        }