public async Task GetByIdOrTitleAsyncThrowsError() { var request = new GetByIdOrTitleRequest { ImdbId = "tt0000000", Type = ItemType.Movie }; await Assert.ThrowsAnyAsync <OpenMovieDatabaseException>(() => _sut.GetByIdOrTitleAsync(request)); }
public async Task GetByIdOrTitleAsync() { var request = new GetByIdOrTitleRequest { ImdbId = "tt0499549", Type = ItemType.Movie }; var response = await _sut.GetByIdOrTitleAsync(request); Assert.NotNull(response); Assert.Equal("tt0499549", response.ImdbID); Assert.Equal("Avatar", response.Title); Assert.NotNull(response.Released); Assert.Equal(18, response.Released.Value.Day); Assert.Equal(12, response.Released.Value.Month); Assert.Equal(2009, response.Released.Value.Year); Assert.NotNull(response.Runtime); Assert.Equal(162, response.Runtime.Value.TotalMinutes); }