예제 #1
0
        public void Event_Initialize_Dispose()
        {
            var e = new MockEvent(42, "Test");

            Assert.IsTrue(e.CanCoalesce);
            Assert.IsTrue(e.IsInitialized);

            Assert.AreEqual(42, e.ViewTag);
            Assert.AreEqual(0, e.CoalescingKey);
            Assert.IsTrue(e.CanCoalesce);

            e.Dispose();
            Assert.IsFalse(e.IsInitialized);
        }
예제 #2
0
        public void Event_Initialize_Dispose()
        {
            var e = new MockEvent(42, TimeSpan.FromSeconds(10), "Test");

            Assert.IsTrue(e.CanCoalesce);
            Assert.IsTrue(e.IsInitialized);

            Assert.AreEqual(42, e.ViewTag);
            Assert.AreEqual(TimeSpan.FromSeconds(10), e.Timestamp);
            Assert.AreEqual(0, e.CoalescingKey);
            Assert.IsTrue(e.CanCoalesce);

            e.Dispose();
            Assert.IsFalse(e.IsInitialized);
        }