public async Task Given_A_DeckSearchByUsernameCriteria_Should_Invoke_Search_Once() { // Arrange const int expected = 1; _deckRepository.Search(Arg.Any <DeckSearchByUsernameCriteria>()).Returns(new DeckSearchResult()); // Act await _sut.Search(new DeckSearchByUsernameCriteria()); // Assert await _deckRepository.Received(expected).Search(Arg.Any <DeckSearchByUsernameCriteria>()); }