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