コード例 #1
0
 @Before
 public void setUp() throws Exception {
   mActivity = Robolectric.setupActivity(Activity.class);
   db = new DbHelper(mActivity);
   database = db.getWritableDatabase();
 }
コード例 #2
0
 @After
 public void tearDown() throws Exception {
   mActivity.deleteDatabase(DbContract.DATABASE_NAME);
   db.close();
 }