示例#1
0
        public void EventHookPriorityComparerTests_RightNull()
        {
            var leftHook = new MockEventHook(GetType(), SurvivalKit.Events.Priority.NORMAL, null);
            var leftMock = new EventListenerRegistration(new MockEventListener(true, false), leftHook);

            var comparer = new EventListenerRegistrationComparer();

            comparer.Compare(leftMock, null);
        }
示例#2
0
        public void EventHookPriorityComparerTests_RightGreater()
        {
            var leftHook  = new MockEventHook(GetType(), SurvivalKit.Events.Priority.NORMAL, null);
            var leftMock  = new EventListenerRegistration(new MockEventListener(true, false), leftHook);
            var rightHook = new MockEventHook(GetType(), SurvivalKit.Events.Priority.HIGHEST, null);
            var rightMock = new EventListenerRegistration(new MockEventListener(true, false), rightHook);

            var comparer = new EventListenerRegistrationComparer();
            var result   = comparer.Compare(leftMock, rightMock);

            Assert.AreEqual(-1, result);
        }