示例#1
0
        public void Test_UserWatchedMoviesRequest_Returns_Valid_UriPathParameters()
        {
            // without extended info
            var request = new UserWatchedMoviesRequest {
                Username = "******"
            };

            request.GetUriPathParameters().Should().NotBeNull()
            .And.HaveCount(1)
            .And.Contain(new Dictionary <string, object>
            {
                ["username"] = "******"
            });

            // with extended info
            var extendedInfo = new TraktExtendedInfo {
                Full = true
            };

            request = new UserWatchedMoviesRequest {
                Username = "******", ExtendedInfo = extendedInfo
            };

            request.GetUriPathParameters().Should().NotBeNull()
            .And.HaveCount(2)
            .And.Contain(new Dictionary <string, object>
            {
                ["username"] = "******",
                ["extended"] = extendedInfo.ToString()
            });
        }