Beispiel #1
0
        public void Should_return_instance_of_event_handler_when_factory_get_is_called_with_valid_request(
            EventType eventType, Type typeOfEventHandler)
        {
            var eventHandler = _sut.Get(eventType);

            eventHandler.Should().BeOfType(typeOfEventHandler);
        }
Beispiel #2
0
        public void Should_throw_exception_when_event_type_is_not_supported()
        {
            var eventHandlerFactory = new EventHandlerFactory(EventHandlersList);

            Action action = () => eventHandlerFactory.Get(EventType.None);

            action.Should().Throw <ArgumentOutOfRangeException>();
        }