diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:43:57 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:43:57 -0800 |
commit | b7926325a1c1a370c84c81db80372f59af240a53 (patch) | |
tree | b1d0214be443ea674d0ded8c502a8e074e50bdd2 /sql/src/test/java/tests/SQLite/ExceptionTest.java | |
parent | 687f18b91f4a0a728a027579110953ee729adcb8 (diff) | |
download | libcore-b7926325a1c1a370c84c81db80372f59af240a53.zip libcore-b7926325a1c1a370c84c81db80372f59af240a53.tar.gz libcore-b7926325a1c1a370c84c81db80372f59af240a53.tar.bz2 |
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'sql/src/test/java/tests/SQLite/ExceptionTest.java')
-rw-r--r-- | sql/src/test/java/tests/SQLite/ExceptionTest.java | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/sql/src/test/java/tests/SQLite/ExceptionTest.java b/sql/src/test/java/tests/SQLite/ExceptionTest.java index cc37c2a..fe86e8f 100644 --- a/sql/src/test/java/tests/SQLite/ExceptionTest.java +++ b/sql/src/test/java/tests/SQLite/ExceptionTest.java @@ -16,24 +16,26 @@ package tests.SQLite; +import SQLite.Database; import SQLite.Exception; +import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargets; import dalvik.annotation.TestLevel; import dalvik.annotation.TestTargetNew; import junit.framework.TestCase; -public class ExceptionTest extends TestCase { - - public ExceptionTest(String name) { - super(name); - } +@TestTargetClass(SQLite.Exception.class) +public class ExceptionTest extends SQLiteTest { + + private Database db = null; - protected void setUp() throws java.lang.Exception { + public void setUp() throws java.lang.Exception { super.setUp(); + db = new Database(); } - - protected void tearDown() throws java.lang.Exception { + + public void tearDown() { super.tearDown(); } @@ -41,13 +43,18 @@ public class ExceptionTest extends TestCase { * @tests {@link Exception#Exception(String)} */ @TestTargetNew( - level = TestLevel.TODO, + level = TestLevel.COMPLETE, notes = "constructor test", method = "Exception", args = {java.lang.String.class} ) public void testException() { - fail("not yet implemented"); + try { + db.open(dbFile.getName(), 0); + } catch (Exception e) { + assertNotNull(e); + assertNotNull(e.getMessage()); + } } } |