Esempio n. 1
0
        public void BaseEventHandler_ShouldHandle_Eventv1_Only()
        {
            var messageTypes = AssemblyScanner.AllMessageTypesHandledBy(typeof(BaseEventHandler)).ToArray();

            Assert.Single(messageTypes);
            Assert.Contains(typeof(Eventv1), messageTypes);
        }
Esempio n. 2
0
        public void Event1And2Handler_ShouldHandle_Event1_And_Event2()
        {
            var messageTypes = AssemblyScanner.AllMessageTypesHandledBy(typeof(Event1And2Handler)).ToArray();

            Assert.Equal(2, messageTypes.Length);
            Assert.Contains(typeof(Event1), messageTypes);
            Assert.Contains(typeof(Event2), messageTypes);
        }
Esempio n. 3
0
        public void BaseAndDerivedEventHandler_ShouldHandle_Eventv1_And_Eventv2()
        {
            var messageTypes = AssemblyScanner.AllMessageTypesHandledBy(typeof(BaseAndDerivedEventHandler)).ToArray();

            Assert.Equal(2, messageTypes.Length);
            Assert.Contains(typeof(Eventv1), messageTypes);
            Assert.Contains(typeof(Eventv2), messageTypes);
        }
Esempio n. 4
0
        public void Event1Handler_ShouldHandle_Event1Only()
        {
            var messageTypes = AssemblyScanner.AllMessageTypesHandledBy(typeof(Event1Handler));

            Assert.Equal(typeof(Event1), messageTypes.Single());
        }