mercredi 29 avril 2015

junit.framework.AssertionFailedError

I get error of this:

junit.framework.AssertionFailedError at com.example.sirivan.myfirstapp.test.TestDb.testCreateDb(TestDb.java:22)

TestDb.java

public class TestDb extends AndroidTestCase {
public static final String LOG_TAG = TestDb.class.getSimpleName();

public void testCreateDb() throws Throwable{
    assertTrue(mContext.deleteDatabase(WeatherDbHelper.DATABASE_NAME));
    SQLiteDatabase db = new WeatherDbHelper(
            this.mContext).getWritableDatabase();
    assertEquals(true, db.isOpen());
    db.close();
}

}

Aucun commentaire:

Enregistrer un commentaire