public void Map_PersonsIsNull_ShouldPass() { // Arrange IQueryable <Person> persons = null; // Act var result = PersonListDtoMapper.Map(persons); // Assert Assert.IsNull(result); }
public async Task <IEnumerable <PersonListDto> > SearchPeople(RequestContext requestContext, string param) { if (string.IsNullOrEmpty(param)) { return(null); } var personList = await PersonRepository.Search(requestContext, param); return(PersonListDtoMapper.Map(personList)); }
public void Map_DateOfBirthIsNull_ShouldPass() { // Arrange IQueryable <Person> persons = new List <Person> { new Person { Id = 1, DateOfBirth = null }, }.AsQueryable();; // Act var result = PersonListDtoMapper.Map(persons); // Assert Assert.IsNotNull(result); }
public async Task <IEnumerable <PersonListDto> > GetAll(RequestContext requestContext) { var personList = await PersonRepository.GetAll(requestContext); return(PersonListDtoMapper.Map(personList)); }