示例#1
0
 public void TestConstructorLogEntryEventArgs()
 {
     ILogEntry entry = new ApplicationLogEntry(MessageType.Warning, null, new object());
     LogEntryEventArgs testLogEntryEventArgs = new LogEntryEventArgs(entry);
     Assert.IsNotNull(testLogEntryEventArgs, "Constructor of type, LogEntryEventArgs failed to create instance.");
     Assert.IsNotNull(testLogEntryEventArgs.LogEntry, "Constructor of type, LogEntryEventArgs failed to create instance.");
     Assert.IsTrue(entry.Equals(testLogEntryEventArgs.LogEntry), "Constructor of type, LogEntryEventArgs failed to create instance.");
 }
示例#2
0
        public void TestEquals()
        {
            ApplicationLogEntry testLogEntry = new ApplicationLogEntry(MessageType.Warning, "", new object());
            object obj = null;
            bool expectedBoolean = false;
            bool resultBoolean = false;
            resultBoolean = testLogEntry.Equals(obj);
            Assert.AreEqual(expectedBoolean, resultBoolean, "Equals method returned unexpected result.");

            expectedBoolean = true;
            resultBoolean = testLogEntry.Equals(testLogEntry);
            Assert.AreEqual(expectedBoolean, resultBoolean, "Equals method returned unexpected result.");
        }