public async Task GetAllAsync_Uses_Map_From_IMapper() { // Arrange var sut = new PersonQueries(_PersonRepository.Object, _mapper.Object); // Act await sut.Search(It.IsAny <string>()); // Assert _mapper.Verify(m => m.Map <IEnumerable <PersonDto> >(It.IsAny <IEnumerable <Person> >()), Times.Once); }
public async Task GetAllAsync_Uses_Search_From_IPersonRepository() { // Arrange var sut = new PersonQueries(_PersonRepository.Object, _mapper.Object); // Act await sut.Search(It.IsAny <string>()); // Assert _PersonRepository.Verify(r => r.Search(It.IsAny <string>()), Times.Once); }