Example #1
0
        public void TestEquals()
        {
            var logEvent1           = new LogEventInfo(LogLevel.Debug, "logger1", "message1");
            AsyncContinuation cont1 = new AsyncContinuation(exception => { });
            var async1 = new AsyncLogEventInfo(logEvent1, cont1);
            var async2 = new AsyncLogEventInfo(logEvent1, cont1);

            Assert.True(async1.Equals(async2));
            Assert.True(async1 == async2);
            Assert.False(async1 != async2);
            Assert.Equal(async1.GetHashCode(), async2.GetHashCode());
        }