@RunWith(AndroidJUnit4.class)
public class TestDatabase{
@Test
public void testCreate(){
}
@Test
public void testInsert(){
Dao dao=new Dao(InstrumentationRegistry.getTargetContext()); //Dao为测试数据库操作类
dao.insert();
}
@Test
public void testDelete(){
Dao dao=new Dao(InstrumentationRegistry.getTargetContext());
dao.delete();
}
@Test
public void testUpdate(){
Dao dao=new Dao(InstrumentationRegistry.getTargetContext());
dao.update();
}
@Test
public void testQuery(){
Dao dao=new Dao(InstrumentationRegistry.getTargetContext());
dao.query();
}
}