コード例 #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
ファイル: TestLogEntry.cs プロジェクト: ecell/ecell3-ide
        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.");
        }