mirror of
https://github.com/jellyfin/TMDbLib.git
synced 2024-11-23 05:40:12 +00:00
Add basic tests
This commit is contained in:
parent
7e183f7e3d
commit
74b51c611d
@ -39,7 +39,8 @@ namespace TMDbLibTests
|
||||
[MovieMethods.AccountStates] = movie => movie.AccountStates,
|
||||
[MovieMethods.ReleaseDates] = movie => movie.ReleaseDates,
|
||||
[MovieMethods.Recommendations] = movie => movie.Recommendations,
|
||||
[MovieMethods.ExternalIds] = movie => movie.ExternalIds
|
||||
[MovieMethods.ExternalIds] = movie => movie.ExternalIds,
|
||||
[MovieMethods.WatchProviders] = movie => movie.WatchProviders
|
||||
};
|
||||
}
|
||||
|
||||
@ -314,7 +315,6 @@ namespace TMDbLibTests
|
||||
public void TestMoviesGetMovieVideos()
|
||||
{
|
||||
ResultContainer<Video> resp = Config.Client.GetMovieVideosAsync(IdHelper.AGoodDayToDieHard).Result;
|
||||
Assert.NotNull(resp);
|
||||
|
||||
Assert.NotNull(resp);
|
||||
Assert.NotNull(resp.Results);
|
||||
@ -332,6 +332,19 @@ namespace TMDbLibTests
|
||||
Assert.Equal("Trailer", video.Type);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestMoviesGetMovieWatchProviders()
|
||||
{
|
||||
SingleResultContainer<WatchProvidersByRegion> resp = Config.Client.GetMovieWatchProvidersAsync(IdHelper.AGoodDayToDieHard).Result;
|
||||
|
||||
Assert.NotNull(resp);
|
||||
|
||||
WatchProvidersByRegion watchProvidersByRegion = resp.Results;
|
||||
Assert.NotNull(watchProvidersByRegion);
|
||||
|
||||
// Not making further assertions since this data is highly dynamic.
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestMoviesGetMovieTranslations()
|
||||
{
|
||||
|
@ -349,6 +349,19 @@ namespace TMDbLibTests
|
||||
Assert.Equal("Opening Credits", tvShow.Videos.Results[0].Type);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestTvShowGetMovieWatchProviders()
|
||||
{
|
||||
SingleResultContainer<WatchProvidersByRegion> resp = Config.Client.GetTvShowWatchProvidersAsync(IdHelper.GameOfThrones).Result;
|
||||
|
||||
Assert.NotNull(resp);
|
||||
|
||||
WatchProvidersByRegion watchProvidersByRegion = resp.Results;
|
||||
Assert.NotNull(watchProvidersByRegion);
|
||||
|
||||
// Not making further assertions since this data is highly dynamic.
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestTvShowTranslations()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user