public void Given_change_password_request_when_ChangePasswordCommand_is_valid_then_return_OkResult()
        {
            var validChangePasswordCommand = new ChangePasswordCommand { UserId = "1"};

            var commandResultViewModel = new CommandResultViewModel { CommandExecuted = true};
            _mockCommandDispatcher.Setup(
                c => c.Dispatch<ChangePasswordCommand, CommandResultViewModel>(validChangePasswordCommand))
                .Returns(commandResultViewModel);

            var controller = GetTarget();
            var response = controller.ChangePassword(validChangePasswordCommand);

            Assert.IsInstanceOf<OkResult>(response);
        }
        public void Given_change_password_request_when_ChangePasswordCommand_is_valid_then_ChangePasswordCommand_is_dispatched_sucessfully()
        {
            ChangePasswordCommand dispatchedChangePasswordCommand = null;

            var validChangePasswordCommand = new ChangePasswordCommand { UserId = "1" };
            var commandResultViewModel = new CommandResultViewModel { CommandExecuted = true};

            _mockCommandDispatcher.Setup(c => c.Dispatch<ChangePasswordCommand, CommandResultViewModel>(validChangePasswordCommand))
                .Returns(commandResultViewModel)
                .Callback<ChangePasswordCommand>(x => dispatchedChangePasswordCommand = x);

            var controller = GetTarget();
            var response = controller.ChangePassword(validChangePasswordCommand);

            Assert.AreEqual(validChangePasswordCommand.UserId, dispatchedChangePasswordCommand.UserId);
        }