android - junit.framework.AssertionFailedError -
i error of this:
junit.framework.assertionfailederror @ 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(); } }
following documentation:
http://developer.android.com/reference/android/content/context.html#deletedatabase(java.lang.string)
returns true if database deleted; else false.
Comments
Post a Comment