Пример #1
0
        public async Task GetShowCastsAsync_ShowNotFound_Should_Return_EmptyList()
        {
            // Arrange
            var httpClient    = HttpClientHelper.GetMockHttpClient(HttpStatusCode.NotFound, String.Empty);
            var tvMazeService = new TvMazeService(httpClient);

            // Act
            var shows = await tvMazeService.GetShowCastsAsync(1);

            // Assert
            Assert.IsEmpty(shows);
        }
Пример #2
0
        public async Task GetShowCastsAsync_NullBirthday_Should_Deserialize()
        {
            // Arrange
            var httpClient    = HttpClientHelper.GetMockHttpClient(HttpStatusCode.OK, File.ReadAllText("seed/cast.json"));
            var tvMazeService = new TvMazeService(httpClient);

            // Act
            var casts = await tvMazeService.GetShowCastsAsync(1);

            // Assert
            Assert.IsNotEmpty(casts);
        }