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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -