Beispiel #1
0
        public void IsValidEventDelegate_GenericCustomArgsEvent_True()
        {
            var eventRef = FindEvent(_goodTypeIsValidEventDelegate, "GenericCustomArgsEvent");

            Assert.IsTrue(EventDefinitionExtensions.IsValidEventDelegate(eventRef.EventType));
        }
Beispiel #2
0
        public void IsValidEventDelegate_SpecializedEvent_True()
        {
            var eventRef = FindEvent(_goodTypeIsValidEventDelegate, "SpecializedEvent");

            Assert.IsTrue(EventDefinitionExtensions.IsValidEventDelegate(eventRef.EventType));
        }
Beispiel #3
0
        public void IsValidEventDelegate_TooManyArgs_False()
        {
            var eventRef = FindEvent(_badTypeIsValidEventDelegate, "EventTooManyArgs");

            Assert.IsFalse(EventDefinitionExtensions.IsValidEventDelegate(eventRef.EventType));
        }
Beispiel #4
0
        public void IsValidEventDelegate_Wrong1stArgType_False()
        {
            var eventRef = FindEvent(_badTypeIsValidEventDelegate, "EventFirstParamNotObject");

            Assert.IsFalse(EventDefinitionExtensions.IsValidEventDelegate(eventRef.EventType));
        }
Beispiel #5
0
        public void IsValidEventDelegate_Wrong2ndArgType_False()
        {
            var eventRef = FindEvent(_badTypeIsValidEventDelegate, "EventNotDerivedFromEventArgs");

            Assert.IsFalse(EventDefinitionExtensions.IsValidEventDelegate(eventRef.EventType));
        }