public void TestTraktCalendarUserMoviesRequestUriParamsWithoutStartDateAndDays() { var request = new TraktCalendarUserMoviesRequest(null); var uriParams = request.GetUriPathParameters(); uriParams.Should().NotBeNull().And.BeEmpty(); }
public void TestTraktCalendarUserMoviesRequestUriParamsWithStartDate() { var startDate = DateTime.Now; var request = new TraktCalendarUserMoviesRequest(null) { StartDate = startDate }; var uriParams = request.GetUriPathParameters(); uriParams.Should().NotBeNull().And.NotBeEmpty().And.HaveCount(1); uriParams.Should().Contain("start_date", startDate.ToTraktDateString()); }
public void TestTraktCalendarUserMoviesRequestUriParamsWithDays() { var startDate = DateTime.Now; var days = 14; var request = new TraktCalendarUserMoviesRequest(null) { Days = days }; var uriParams = request.GetUriPathParameters(); uriParams.Should().NotBeNull().And.NotBeEmpty().And.HaveCount(2); uriParams.Should().Contain(new Dictionary <string, object> { ["start_date"] = startDate.ToTraktDateString(), ["days"] = days }); }
public void TestTraktCalendarUserMoviesRequestHasValidUriTemplate() { var request = new TraktCalendarUserMoviesRequest(null); request.UriTemplate.Should().Be("calendars/my/movies{/start_date}{/days}{?extended,query,years,genres,languages,countries,runtimes,ratings}"); }
public void TestTraktCalendarUserMoviesRequestHasAuthorizationRequired() { var request = new TraktCalendarUserMoviesRequest(null); request.AuthorizationRequirement.Should().Be(TraktAuthorizationRequirement.Required); }