public async Task ExecuteAsync_WhenCalled_AssertAccountNumberWasCalledOnDeleteBudgetAccountCommand()
        {
            CommandHandler sut = CreateSut();

            Mock <IDeleteBudgetAccountCommand> commandMock = CreateCommandMock();
            await sut.ExecuteAsync(commandMock.Object);

            commandMock.Verify(m => m.AccountNumber, Times.Once);
        }
        public async Task ExecuteAsync_WhenCalled_AssertDeleteBudgetAccountAsyncWasCalledOnAccountingRepository()
        {
            CommandHandler sut = CreateSut();

            int    accountingNumber             = _fixture.Create <int>();
            string accountNumber                = _fixture.Create <string>();
            IDeleteBudgetAccountCommand command = CreateCommand(accountingNumber, accountNumber);
            await sut.ExecuteAsync(command);

            _accountingRepositoryMock.Verify(m => m.DeleteBudgetAccountAsync(
                                                 It.Is <int>(value => value == accountingNumber),
                                                 It.Is <string>(value => string.CompareOrdinal(value, accountNumber) == 0)),
                                             Times.Once);
        }
        public void ExecuteAsync_WhenCommandIsNull_ThrowsArgumentNullException()
        {
            CommandHandler sut = CreateSut();

            ArgumentNullException result = Assert.ThrowsAsync <ArgumentNullException>(async() => await sut.ExecuteAsync(null));

            Assert.That(result.ParamName, Is.EqualTo("command"));
        }