public void EventHandlerProxiesRegistry_ForRegisteredEventType_ReturnsCollection() { var registry = new EventHandlerProxiesRegistry(); var eventHandler = MockRepository.GenerateMock <IEventHandler<DummyEvent>>(); registry.Register<DummyEvent>(eventHandler.Handle); registry.Register<DummyEvent>(eventHandler.Handle); Assert.AreEqual(2,registry.ForEvent<DummyEvent>().Count()); }
public void EventHandlerProxiesRegistry_ForUnregisteredEventType_ReturnsEmptyCollection() { var registry = new EventHandlerProxiesRegistry(); Assert.IsFalse(registry.ForEvent<DummyEvent>().Any()); }