public void Test_TraktMovieFilterBuilder_ToString() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter .WithQuery("query") .WithYears(2016, 2018) .WithGenres("action", "drama") .WithLanguages("de", "en") .WithCountries("gb", "us") .WithRuntimes(30, 180) .WithRatings(60, 90) .WithCertifications("pg-13", "nr") .Build(); filter.ToString().Should().Be("query=query&years=2016-2018&genres=action,drama&languages=de,en" + "&countries=gb,us&runtimes=30-180&ratings=60-90&certifications=pg-13,nr"); }
public void Test_TraktMovieFilterBuilder_EmptyFilter() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter.Build(); filter.Query.Should().BeNull(); filter.Year.Should().BeNull(); filter.Years.Should().BeNull(); filter.Genres.Should().BeNull(); filter.Languages.Should().BeNull(); filter.Countries.Should().BeNull(); filter.Runtimes.Should().BeNull(); filter.Ratings.Should().BeNull(); filter.Certifications.Should().BeNull(); filter.HasValues.Should().BeFalse(); filter.ToString().Should().NotBeNull().And.BeEmpty(); filter.GetParameters().Should().NotBeNull().And.BeEmpty(); }
public void Test_TraktMovieFilterBuilder_ToString_With_Certifications() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter.WithCertifications("pg-13", "nr").Build(); filter.ToString().Should().Be("certifications=pg-13,nr"); }
public void Test_TraktMovieFilterBuilder_ToString_With_Ratings() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter.WithRatings(60, 90).Build(); filter.ToString().Should().Be("ratings=60-90"); }
public void Test_TraktMovieFilterBuilder_ToString_With_Runtimes() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter.WithRuntimes(30, 180).Build(); filter.ToString().Should().Be("runtimes=30-180"); }
public void Test_TraktMovieFilterBuilder_ToString_With_Countries() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter.WithCountries("gb", "us").Build(); filter.ToString().Should().Be("countries=gb,us"); }
public void Test_TraktMovieFilterBuilder_ToString_With_Languages() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter.WithLanguages("de", "en").Build(); filter.ToString().Should().Be("languages=de,en"); }
public void Test_TraktMovieFilterBuilder_ToString_With_Genres() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter.WithGenres("action", "drama").Build(); filter.ToString().Should().Be("genres=action,drama"); }
public void Test_TraktMovieFilterBuilder_ToString_With_Years_Reversed() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter.WithYears(2018, 2016).Build(); filter.ToString().Should().Be("years=2016-2018"); }
public void Test_TraktMovieFilterBuilder_ToString_With_Query() { ITraktMovieFilter filter = TraktFilterDirectory.MovieFilter.WithQuery("query").Build(); filter.ToString().Should().Be("query=query"); }