INT-1602 changed to receive HOME Timeline updates instead of Friends

This commit is contained in:
Oleg Zhurakousky
2010-11-11 10:07:59 -05:00
parent 834f6ca265
commit 8c63cc003a
5 changed files with 15 additions and 15 deletions

View File

@@ -89,10 +89,10 @@ public class Twitter4jTemplateTests {
@Test
public void testGetFriendsTimeline() throws Exception{
template.getFriendsTimeline();
template.getFriendsTimeline(123);
verify(twitter, times(1)).getFriendsTimeline();
verify(twitter, times(1)).getFriendsTimeline(Mockito.any(Paging.class));
template.getHomeTimeline();
template.getHomeTimeline(123);
verify(twitter, times(1)).getHomeTimeline();
verify(twitter, times(1)).getHomeTimeline(Mockito.any(Paging.class));
}
@Test

View File

@@ -131,7 +131,7 @@ public class TimelineUpdateReceivingMessageSourceTests {
Tweet message = (Tweet) msg.poll();
assertEquals(2000, message.getId());
Thread.sleep(1000);
verify(twitter, times(1)).getFriendsTimeline(2000);
verify(twitter, times(1)).getHomeTimeline(2000);
// based on the Mock, the Queue shoud now have 2 mopre messages third and fourth
assertTrue(((Queue)TestUtils.getPropertyValue(source, "tweets")).size() == 2);
source.stop();
@@ -209,12 +209,12 @@ public class TimelineUpdateReceivingMessageSourceTests {
SampleResoponceList testMessages = new SampleResoponceList();
testMessages.add(firstMessage);
testMessages.add(secondMessage);
when(tw.getFriendsTimeline()).thenReturn(testMessages);
when(tw.getHomeTimeline()).thenReturn(testMessages);
testMessages = new SampleResoponceList();
testMessages.add(thirdMessage);
testMessages.add(fourthMessage);
when(tw.getFriendsTimeline(Mockito.any(Paging.class))).thenReturn(testMessages);
when(tw.getHomeTimeline(Mockito.any(Paging.class))).thenReturn(testMessages);
}
@SuppressWarnings({ "rawtypes", "serial" })