public ListsOwnerships ( string screenName, long cursor = null, int count = null ) : Task |
||
screenName | string | |
cursor | long | |
count | int | |
Résultat | Task |
public async Task ListsOwnerships_Test() { using (var twitterApi = new TwitterApi()) { var mock = new Mock <IApiConnection>(); mock.Setup(x => x.GetAsync <TwitterLists>( new Uri("lists/ownerships.json", UriKind.Relative), new Dictionary <string, string> { { "screen_name", "twitterapi" }, { "cursor", "-1" }, { "count", "100" }, }, "/lists/ownerships") ) .ReturnsAsync(new TwitterLists()); twitterApi.apiConnection = mock.Object; await twitterApi.ListsOwnerships("twitterapi", cursor : -1L, count : 100) .ConfigureAwait(false); mock.VerifyAll(); } }
public async Task ListsOwnerships_Test() { using (var twitterApi = new TwitterApi()) { var mock = new Mock<IApiConnection>(); mock.Setup(x => x.GetAsync<TwitterLists>( new Uri("lists/ownerships.json", UriKind.Relative), new Dictionary<string, string> { { "screen_name", "twitterapi" }, { "cursor", "-1" }, { "count", "100" }, }, "/lists/ownerships") ) .ReturnsAsync(new TwitterLists()); twitterApi.apiConnection = mock.Object; await twitterApi.ListsOwnerships("twitterapi", cursor: -1L, count: 100) .ConfigureAwait(false); mock.VerifyAll(); } }