public ITwitterPageIterator <ITwitterResult <ITwitterListCursorQueryResultDTO> > GetUserListSubscriptionsIterator(IGetUserListSubscriptionsParameters parameters, ITwitterRequest request)
        {
            return(_pageCursorIteratorFactories.Create(parameters, cursor =>
            {
                var cursoredParameters = new GetUserListSubscriptionsParameters(parameters)
                {
                    Cursor = cursor
                };

                return _twitterListQueryExecutor.GetUserListSubscriptionsAsync(cursoredParameters, new TwitterRequest(request));
            }));
        }
Beispiel #2
0
        public void GetUserListSubscriptionsQuery_ReturnsExpectedQuery()
        {
            // arrange
            var queryGenerator = CreateTwitterListQueryGenerator();

            var parameters = new GetUserListSubscriptionsParameters(42)
            {
                Cursor   = "my_cursor",
                PageSize = 51,
                CustomQueryParameters = { new Tuple <string, string>("hello", "world") }
            };

            // Act
            var result = queryGenerator.GetUserListSubscriptionsQuery(parameters);

            // Assert
            Assert.Equal(result, "https://api.twitter.com/1.1/lists/subscriptions.json?user_id=42&cursor=my_cursor&count=51&hello=world");
        }