public async Task <ServiceResponse <GetLostDogWithCommentsDto> > GetLostDogDetails(int dogId)
        {
            var repoResponse = await lostDogDataRepository.GetLostDogDetails(dogId);

            var serviceResponse = mapper.Map <ServiceResponse <GetLostDogWithCommentsDto> >(repoResponse);

            if (!serviceResponse.Successful)
            {
                serviceResponse.StatusCode = StatusCodes.Status400BadRequest;
            }
            return(serviceResponse);
        }
Esempio n. 2
0
        public async void GettingLostDogDetailsForDogOneSuccessful(int dogId)
        {
            var result = await lostDogRepository.GetLostDogDetails(dogId);

            Assert.True(result.Successful);
        }