public async Task Service_Returns_DefaultValue() { var httpClient = new MockHttpClient(Responses); var dogs = new DogceoPictures(httpClient, "broken_dog_url"); var stream = await dogs.GetDogPictureAsync(); var response = new StreamReader(stream).ReadToEnd(); Assert.AreEqual("a picture of a default dog", response); }
public async Task Service_Returns_Dog() { var httpClient = new MockHttpClient(Responses); var dogs = new DogceoPictures(httpClient, "test_dog_url"); var stream = await dogs.GetDogPictureAsync(); var actual = new StreamReader(stream).ReadToEnd(); Assert.AreEqual("a picture of a dog", actual); }