Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewTPage committed Jul 22, 2016
1 parent 90a3c07 commit 678658e
Showing 1 changed file with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
*/

@RunWith(AndroidJUnit4.class)
public class SlyceMessagingTests extends ActivityInstrumentationTestCase2<MainActivity> {
public class SlyceMessagingUITests extends ActivityInstrumentationTestCase2<MainActivity> {

MainActivity mActivity;
SlyceMessagingFragment mFragment;
RecyclerView mRecyclerView;
MessageRecyclerAdapter mAdapter;
private MainActivity mActivity;
private SlyceMessagingFragment mFragment;
private RecyclerView mRecyclerView;
private MessageRecyclerAdapter mAdapter;

public SlyceMessagingTests() {
public SlyceMessagingUITests() {
super(MainActivity.class);
}

Expand Down Expand Up @@ -64,4 +64,18 @@ public void addMessageButStillAtBottom() {
mFragment.addNewMessage(textMessage);
checkIsAtBottom();
}

@Test
public void addManyMessageButStillAtBottom() {
for (int i = 0; i < 10; i++) {
TextMessage textMessage = new TextMessage();
textMessage.setText("hi");
textMessage.setSource(MessageSource.LOCAL_USER);
textMessage.setDate(new Date().getTime());
textMessage.setUserId("ueoanhotneutnhaeuo");
textMessage.setAvatarUrl("");
mFragment.addNewMessage(textMessage);
}
checkIsAtBottom();
}
}

0 comments on commit 678658e

Please sign in to comment.