public async Task ExecuteAsync_WhenCalled_AssertToNumberWasCalledOnCommand() { CommandHandler sut = CreateSut(); Mock <IDeleteBudgetAccountGroupCommand> commandMock = CreateCommandMock(); await sut.ExecuteAsync(commandMock.Object); commandMock.Verify(m => m.Number, Times.Once); }
public async Task ExecuteAsync_WhenCalled_AssertDeleteBudgetAccountGroupAsyncWasCalledOnAccountingRepository() { CommandHandler sut = CreateSut(); int number = _fixture.Create <int>(); IDeleteBudgetAccountGroupCommand command = CreateCommandMock(number).Object; await sut.ExecuteAsync(command); _accountingRepositoryMock.Verify(m => m.DeleteBudgetAccountGroupAsync(It.Is <int>(value => value == number)), Times.Once); }