public async void GetCarsByPeopleId_MatchResult() { string message = "Este veículo não pode circular de quarta-feira"; var result = await _carUseCase.GetCarsByPeopleId(3); Assert.Equal(lstCar[0].carCaster, message); Assert.Equal(lstCar, result); }
public async Task <IActionResult> GetById(int id) { if (id == 0) { return(BadRequest()); } People people = await _peopleUseCase.GetById(id); if (people == null) { return(NotFound()); } List <Car> car = await _carUseCase.GetCarsByPeopleId(id); PeopleDTO peopleDTO = PeopleMapper.MapperModelToDTO(people, car); return(Ok(peopleDTO)); }