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