public void GetCommandHandler_NullElementType_ReturnsCorrectHandler(bool canExecute, object commandParameter)
        {
            // arrange
            _command.CanExecute(Arg.Any <object>()).Returns(canExecute);

            // act
            var handler = _factory.GetCommandHandler(_e.EventInfo, _e.EventName, null, _command, commandParameter);

            // assert
            AssertHelpers.CommandHandler(handler, EventArgs.Empty, _command, canExecute, commandParameter);
        }
        public void GetCommandHandler_NullElementType_ReturnsCorrectHandler(bool canExecute, string eventArgs)
        {
            // arrange
            _command.CanExecute(Arg.Any <object>()).Returns(canExecute);

            // act
            var handler = _factory.GetCommandHandler <string>(_e.EventInfo, _e.EventName, null, _command);

            // assert
            AssertHelpers.CommandHandler <string>(handler, eventArgs, _command, canExecute, eventArgs);
        }
        public void GetCommandHandler_NullCommand_ReturnsHandlerWithNullRefException(bool canExecute, object commandParameter)
        {
            // arrange
            _command.CanExecute(Arg.Any <object>()).Returns(canExecute);

            // act
            var handler = _factory.GetCommandHandler(_e.EventInfo, _e.EventName, _e.ElementType, null, commandParameter);

            // assert
            Assert.Throws <NullReferenceException>(() =>
                                                   AssertHelpers.CommandHandler(handler, EventArgs.Empty, _command, canExecute, commandParameter));
        }
        public void GetCommandHandler_NullCommand_ReturnsHandlerWithNullRefException(bool canExecute, string eventArgs)
        {
            // arrange
            _command.CanExecute(Arg.Any <object>()).Returns(canExecute);

            // act
            var handler = _factory.GetCommandHandler <string>(_e.EventInfo, _e.EventName, _e.ElementType, null);

            // assert
            Assert.Throws <NullReferenceException>(() =>
                                                   AssertHelpers.CommandHandler <string>(handler, eventArgs, _command, canExecute, eventArgs));
        }