public async Task GetShowAsync_MockWebApi_ShowId_Show() { // Arrange const int showId = 1; var json = File.ReadAllText(Path.Combine(BasePath, DomainObjectFactoryTests.JSON_DATA_PATH, "show.json")); var mockHttp = new MockHttpMessageHandler(); mockHttp.Expect($"{BASE_API_URL}/shows/{showId}") .Respond("application/json", json); var tvMazeClient = new TvMazeClient(BASE_API_URL, mockHttp.ToHttpClient()); // Act var show = await tvMazeClient.GetShowAsync(showId); // Assert Assert.IsNotNull(show); Assert.AreEqual(showId, show.Id); mockHttp.VerifyNoOutstandingExpectation(); }