Ejemplo n.º 1
0
 @Test
 public void testShowMessageString() {
   int calculated = adapter.getItemCount() + 1;
   chatActivity.showMessage("Test that ***.");
   int after = adapter.getItemCount();
   assertEquals(calculated, after);
 }
Ejemplo n.º 2
0
 @Test
 public void testShowMessageFile() throws IOException {
   int calculated = adapter.getItemCount() + 1;
   File file = File.createTempFile("Test that ***.", ".jpeg", context.getFilesDir());
   chatActivity.showMessage(file);
   int after = adapter.getItemCount();
   assertEquals(calculated, after);
 }
Ejemplo n.º 3
0
 @Test
 public void testUpdateDataSet() throws IllegalAccessException, NoSuchFieldException {
   chatActivity.onResume();
   chatActivity.showMessage("test");
   assertTrue(recyclerView.hasPendingAdapterUpdates());
   chatActivity.updateDataSet();
   // assertFalse(recyclerView.hasPendingAdapterUpdates());
   chatActivity.onStop();
 }