public async Task GetByIdAsyncWhenNoVetProfileFoundReturnsVetProfileNotFoundResponse() { //Arrange var mockVetProfileRepository = GetDefaultIVetProfileRepositoryInstance(); var mockVetVeterinaryRepository = GetDefaultIVetVeterinaryRepositoryInstance(); var mockUnitOfWork = GetDefaultIUnitOfWorkInstance(); var mockCityRepository = GetDefaultICityRepositoryInstance(); var mockProvinceRepository = GetDefaultIProvinceRepositoryInstance(); var mockUserRepository = GetDefaultIUserRepositoryInstance(); var vetProfileId = 1; mockVetProfileRepository.Setup(r => r.FindById(vetProfileId)) .Returns(Task.FromResult <VetProfile>(null)); var service = new VetProfileService(mockVetProfileRepository.Object, mockVetVeterinaryRepository.Object, mockUnitOfWork.Object, mockProvinceRepository.Object, mockCityRepository.Object, mockUserRepository.Object); //Act VetProfileResponse result = await service.GetByIdAsync(vetProfileId); var message = result.Message; //Assert message.Should().Be("VetProfile not found"); }