public async Task GetCastCreditsAsync_MockWebApi_PersonId_CastCredits() { // Arrange const int personId = 1; var json = File.ReadAllText(Path.Combine(BasePath, DomainObjectFactoryTests.JSON_DATA_PATH, "person_castcredits.json")); var mockHttp = new MockHttpMessageHandler(); mockHttp.Expect($"{BASE_API_URL}/people/{personId}/castcredits") .Respond("application/json", json); var tvMazeClient = new TvMazeClient(BASE_API_URL, mockHttp.ToHttpClient()); // Act var castCredits = await tvMazeClient.GetCastCreditsAsync(personId); // Assert Assert.IsNotNull(castCredits); Assert.IsNotEmpty(castCredits); mockHttp.VerifyNoOutstandingExpectation(); }