コード例 #1
0
 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());
 }
コード例 #2
0
 public void EventHandlerProxiesRegistry_ForUnregisteredEventType_ReturnsEmptyCollection()
 {
     var registry = new EventHandlerProxiesRegistry();
     Assert.IsFalse(registry.ForEvent<DummyEvent>().Any());
 }