Exemplo n.º 1
0
        public void GroupByEvent_GroupsSingleHandlerByMultipleEventTypes()
        {
            var handler  = new MultiImplHandler();
            var handlers = new[] { handler };

            var grouped = handlers.GroupByEvent();

            Assert.NotNull(grouped);
            Assert.Collection(
                grouped,
                x => AssertGrouping(x, typeof(MockEvent), handler),
                x => AssertGrouping(x, typeof(MockEvent2), handler));
Exemplo n.º 2
0
        public void GetEventTypes_ReturnsAllImplementationEventTypes()
        {
            var handler = new MultiImplHandler();

            var types = handler.GetEventTypes();

            Assert.NotNull(types);
            Assert.Collection(
                types,
                x => Assert.Equal(typeof(MockEvent), x),
                x => Assert.Equal(typeof(MockEvent2), x));
        }