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."); }
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."); }