public void TestTraktSearchIdLookupRequestUriParamsWithoutIdType()
        {
            var request = new TraktSearchIdLookupRequest(null)
            {
                IdType = null
            };

            Action act = () => request.GetUriPathParameters();

            act.ShouldThrow <ArgumentNullException>();
        }
        public void TestTraktSearchIdLookupRequestUriParamsWithoutLookupId()
        {
            var request = new TraktSearchIdLookupRequest(null)
            {
                IdType   = TraktSearchIdType.Trakt,
                LookupId = null
            };

            Action act = () => request.GetUriPathParameters();

            act.ShouldThrow <ArgumentException>();

            request = new TraktSearchIdLookupRequest(null)
            {
                IdType   = TraktSearchIdType.Trakt,
                LookupId = string.Empty
            };

            act = () => request.GetUriPathParameters();
            act.ShouldThrow <ArgumentException>();
        }
        public void TestTraktSearchIdLookupRequestUriParamsWithResultTypes()
        {
            var idType      = TraktSearchIdType.Trakt;
            var lookupId    = "2";
            var resultTypes = TraktSearchResultType.Movie | TraktSearchResultType.Show;

            var request = new TraktSearchIdLookupRequest(null)
            {
                IdType      = idType,
                LookupId    = lookupId,
                ResultTypes = resultTypes
            };

            var uriParams = request.GetUriPathParameters();

            uriParams.Should().NotBeNull().And.NotBeEmpty().And.HaveCount(3);
            uriParams.Should().Contain(new Dictionary <string, object>
            {
                ["id_type"] = idType.UriName,
                ["id"]      = lookupId,
                ["type"]    = resultTypes.UriName
            });
        }
        public void TestTraktSearchIdLookupRequestHasValidUriTemplate()
        {
            var request = new TraktSearchIdLookupRequest(null);

            request.UriTemplate.Should().Be("search/{id_type}/{id}{?type,extended,page,limit}");
        }
        public void TestTraktSearchIdLookupRequestHasAuthorizationNotRequired()
        {
            var request = new TraktSearchIdLookupRequest(null);

            request.AuthorizationRequirement.Should().Be(TraktAuthorizationRequirement.NotRequired);
        }