winterwell.jtwitter
Class TwitterTest

java.lang.Object
  extended by TestCase
      extended by winterwell.jtwitter.TwitterTest

public class TwitterTest
extends TestCase

Unit tests for JTwitter. These only provide partial testing -- sorry.


Field Summary
static java.lang.String TEST_PASSWORD
           
 
Constructor Summary
TwitterTest()
           
 
Method Summary
 void canSend160()
          Check that you can send 160 chars if you wants
 void dontTestFollowLag()
          Created on a day when Twitter's followers API was being particularly flaky, in order to find out just how bad the lag was.
static void main(java.lang.String[] args)
           
 void testAagha()
           
 void testBulkShow()
           
 void testBulkShowById()
           
 void testDestroyStatus()
          NONDETERMINISTIC! Had to increase sleep time to make it more reliable.
 void testDestroyStatusBad()
           
 void testFollowAndStopFollowing()
          Test method for Twitter.follow(java.lang.String).
 void testFollowerIDs()
          Test method for Twitter.getFollowerIDs() and Twitter.getFollowerIDs(String).
 void testFriendIDs()
          Test method for Twitter.getFriendIDs() and Twitter.getFriendIDs(String).
 void testGetDirectMessages()
          Test method for Twitter.getDirectMessages().
 void testGetDirectMessagesSent()
          Test method for Twitter.getDirectMessagesSent().
 void testGetFeatured()
          Test method for Twitter.getFeatured().
 void testGetFollowers()
          Test method for Twitter.getFollowers().
 void testGetFriends()
          Test method for Twitter.getFriends().
 void testGetFriendsString()
          Test method for Twitter.getFriends(java.lang.String).
 void testGetFriendsTimeline()
          Test method for Twitter.getFriendsTimeline().
 void testGetManyFollowers()
          Test the cursor-based API for getting many followers.
 void testGetPublicTimeline()
          Test method for Twitter.getPublicTimeline().
 void testGetRateLimitStats()
           
 void testGetReplies()
          Test method for Twitter.getReplies().
 void testGetStatus()
          Test method for winterwell.jtwitter.Twitter#getStatus(int).
 void testGetStatusLong()
          Test method for Twitter.getStatus(long).
 void testGetUserTimeline()
          Test method for Twitter.getUserTimeline().
 void testGetUserTimelineString()
          Test method for winterwell.jtwitter.Twitter#getUserTimeline(java.lang.String, java.lang.Integer, java.util.Date).
 void testIdentica()
           
 void testIdenticaAccess()
           
 void testIsFollower()
          Test method for Twitter.isFollower(String) and Twitter.isFollower(String, String).
 void testIsValidLogin()
           
 void testManyFollowerIDs()
          Test the new cursor-based follower/friend methods.
 void testMisc()
           
 void testRetweet()
           
 void testRetweetsByMe()
           
 void testSearch()
           
 void testSearchUsers()
           
 void testSendMessage()
          Test method for Twitter.sendMessage(java.lang.String, java.lang.String).
 void testShow()
          Test method for Twitter.show(java.lang.String).
 void testTooOld()
           
 void testUpdateStatus()
          Test method for Twitter.updateStatus(java.lang.String).
 void testUpdateStatusLength()
          This crashes out at above 140, which is correct
 void testUpdateStatusUnicode()
           
 void testUserExists()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_PASSWORD

public static final java.lang.String TEST_PASSWORD
See Also:
Constant Field Values
Constructor Detail

TwitterTest

public TwitterTest()
Method Detail

testRetweetsByMe

public void testRetweetsByMe()

testMisc

public void testMisc()

main

public static void main(java.lang.String[] args)

testSearchUsers

public void testSearchUsers()

testBulkShow

public void testBulkShow()

testBulkShowById

public void testBulkShowById()

canSend160

public void canSend160()
Check that you can send 160 chars if you wants


testDestroyStatus

public void testDestroyStatus()
                       throws java.lang.InterruptedException
NONDETERMINISTIC! Had to increase sleep time to make it more reliable.

Throws:
java.lang.InterruptedException

testDestroyStatusBad

public void testDestroyStatusBad()

testFollowAndStopFollowing

public void testFollowAndStopFollowing()
                                throws java.lang.InterruptedException
Test method for Twitter.follow(java.lang.String).

Throws:
java.lang.InterruptedException

testIdenticaAccess

public void testIdenticaAccess()

testFollowerIDs

public void testFollowerIDs()
Test method for Twitter.getFollowerIDs() and Twitter.getFollowerIDs(String).


testManyFollowerIDs

public void testManyFollowerIDs()
Test the new cursor-based follower/friend methods.


testFriendIDs

public void testFriendIDs()
Test method for Twitter.getFriendIDs() and Twitter.getFriendIDs(String).


testGetDirectMessages

public void testGetDirectMessages()
Test method for Twitter.getDirectMessages().


testGetDirectMessagesSent

public void testGetDirectMessagesSent()
Test method for Twitter.getDirectMessagesSent().


testGetFeatured

public void testGetFeatured()
Test method for Twitter.getFeatured().


testGetFollowers

public void testGetFollowers()
Test method for Twitter.getFollowers().


testGetFriends

public void testGetFriends()
Test method for Twitter.getFriends().


testGetManyFollowers

public void testGetManyFollowers()
Test the cursor-based API for getting many followers. Slightly intermittent


testGetFriendsString

public void testGetFriendsString()
Test method for Twitter.getFriends(java.lang.String).


testGetFriendsTimeline

public void testGetFriendsTimeline()
Test method for Twitter.getFriendsTimeline().


testTooOld

public void testTooOld()

testGetPublicTimeline

public void testGetPublicTimeline()
Test method for Twitter.getPublicTimeline().


testGetRateLimitStats

public void testGetRateLimitStats()
                           throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testGetReplies

public void testGetReplies()
Test method for Twitter.getReplies().


testAagha

public void testAagha()

testGetStatus

public void testGetStatus()
Test method for winterwell.jtwitter.Twitter#getStatus(int).


testGetStatusLong

public void testGetStatusLong()
Test method for Twitter.getStatus(long).


testGetUserTimeline

public void testGetUserTimeline()
Test method for Twitter.getUserTimeline().


testGetUserTimelineString

public void testGetUserTimelineString()
Test method for winterwell.jtwitter.Twitter#getUserTimeline(java.lang.String, java.lang.Integer, java.util.Date).


testIsFollower

public void testIsFollower()
                    throws java.lang.InterruptedException
Test method for Twitter.isFollower(String) and Twitter.isFollower(String, String).

Throws:
java.lang.InterruptedException

testRetweet

public void testRetweet()

testSearch

public void testSearch()

testSendMessage

public void testSendMessage()
Test method for Twitter.sendMessage(java.lang.String, java.lang.String).


testShow

public void testShow()
Test method for Twitter.show(java.lang.String).


testUpdateStatus

public void testUpdateStatus()
Test method for Twitter.updateStatus(java.lang.String).


testUpdateStatusLength

public void testUpdateStatusLength()
                            throws java.lang.InterruptedException
This crashes out at above 140, which is correct

Throws:
java.lang.InterruptedException

testUpdateStatusUnicode

public void testUpdateStatusUnicode()

testUserExists

public void testUserExists()

dontTestFollowLag

public void dontTestFollowLag()
                       throws java.io.IOException,
                              java.lang.InterruptedException
Created on a day when Twitter's followers API was being particularly flaky, in order to find out just how bad the lag was.

Throws:
java.io.IOException - if the output file can't be opened for writing
java.lang.InterruptedException

testIsValidLogin

public void testIsValidLogin()

testIdentica

public void testIdentica()