Add basic tests

This commit is contained in:
Björn Orri Saemundsson 2021-01-06 10:39:27 +00:00
parent 7e183f7e3d
commit 74b51c611d
2 changed files with 28 additions and 2 deletions

View File

@ -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()
{

View File

@ -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()
{