ListsMemberships() public méthode

public ListsMemberships ( string screenName, long cursor = null, int count = null, bool filterToOwnedLists = null ) : Task
screenName string
cursor long
count int
filterToOwnedLists bool
Résultat Task
Exemple #1
0
        public async Task ListsMemberships_Test()
        {
            using (var twitterApi = new TwitterApi())
            {
                var mock = new Mock <IApiConnection>();
                mock.Setup(x =>
                           x.GetAsync <TwitterLists>(
                               new Uri("lists/memberships.json", UriKind.Relative),
                               new Dictionary <string, string> {
                    { "screen_name", "twitterapi" },
                    { "cursor", "-1" },
                    { "count", "100" },
                    { "filter_to_owned_lists", "true" },
                },
                               "/lists/memberships")
                           )
                .ReturnsAsync(new TwitterLists());

                twitterApi.apiConnection = mock.Object;

                await twitterApi.ListsMemberships("twitterapi", cursor : -1L, count : 100, filterToOwnedLists : true)
                .ConfigureAwait(false);

                mock.VerifyAll();
            }
        }
Exemple #2
0
        public async Task ListsMemberships_Test()
        {
            using (var twitterApi = new TwitterApi())
            {
                var mock = new Mock<IApiConnection>();
                mock.Setup(x =>
                    x.GetAsync<TwitterLists>(
                        new Uri("lists/memberships.json", UriKind.Relative),
                        new Dictionary<string, string> {
                            { "screen_name", "twitterapi" },
                            { "cursor", "-1" },
                            { "count", "100" },
                            { "filter_to_owned_lists", "true" },
                        },
                        "/lists/memberships")
                )
                .ReturnsAsync(new TwitterLists());

                twitterApi.apiConnection = mock.Object;

                await twitterApi.ListsMemberships("twitterapi", cursor: -1L, count: 100, filterToOwnedLists: true)
                    .ConfigureAwait(false);

                mock.VerifyAll();
            }
        }