Code example for List

Methods: getsize, assertNotEmpty

public class SampleTestTarget3TestCase extends AndroidTestCase {
    public void testGetAllList() throws Exception { 
        SampleTestTarget3 target = new SampleTestTarget3();
        List<SampleDBEntity> list = target.getAllListFromDB(new SampleMockContext(getContext()));
        assertEquals(3, list.size());
            SampleDBEntity entity = list.get(0);
            assertEquals(1, entity.getId());
            assertEquals("KeithYokoma", entity.getName());
            SampleDBEntity entity = list.get(1);
            assertEquals(2, entity.getId());
            assertEquals("HogeFugao", entity.getName());
            SampleDBEntity entity = list.get(2);
            assertEquals(3, entity.getId());
            assertEquals("HiyoHiyo", entity.getName());
Connect your IDE to all the code out there  Get Codota for Java