Created
November 25, 2012 10:43
-
-
Save komiya-atsushi/4143064 to your computer and use it in GitHub Desktop.
Paging#count() of ListsResources#getUserListStatuses() doesn't work.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* TFJ-726 reproducing code. | |
*/ | |
import org.junit.Assert; | |
import org.junit.Test; | |
import twitter4j.*; | |
public class GetUserListStatusesPagingCountTest { | |
@Test | |
public void pagingCountDosentWork() throws TwitterException { | |
final int COUNT = 10; | |
Twitter twitter = TwitterFactory.getSingleton(); | |
Paging paging = new Paging(); | |
paging.count(COUNT); | |
ResponseList<Status> res = | |
.getUserListStatuses(633835271L, "tokyowebmining-23", paging); | |
int actual = res.size(); | |
Assert | |
.assertTrue( | |
String | |
.format( | |
"Twitter#getUserListStatuses(userId, slug, new Paging().count(%d)).size() must be equal or less than %d, but %d", | |
COUNT, | |
COUNT, | |
actual), | |
actual <= COUNT); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment