From: Tim P. <ti...@pa...> - 2007-02-26 10:53:14
|
Update of /usr/cvsroot/melati/poem/src/test/java/org/melati/poem/test/throwing In directory rama.paneris.org:/tmp/cvs-serv9753/poem/src/test/java/org/melati/poem/test/throwing Modified Files: TableTest.java Log Message: Catch loadException Index: TableTest.java =================================================================== RCS file: /usr/cvsroot/melati/poem/src/test/java/org/melati/poem/test/throwing/TableTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TableTest.java 23 Feb 2007 16:39:48 -0000 1.4 +++ TableTest.java 26 Feb 2007 09:52:03 -0000 1.5 @@ -9,6 +9,7 @@ import org.melati.poem.PoemDatabaseFactory; import org.melati.poem.SQLSeriousPoemException; import org.melati.poem.SimpleRetrievalFailedPoemException; +import org.melati.poem.Column.LoadException; import org.melati.poem.dbms.test.sql.ThrowingConnection; import org.melati.poem.dbms.test.sql.ThrowingPreparedStatement; import org.melati.poem.dbms.test.sql.ThrowingResultSet; @@ -504,6 +505,16 @@ ThrowingResultSet.stopThrowing("next"); ThrowingResultSet.stopThrowing("close"); } + getDb().uncacheContents(); + ThrowingResultSet.startThrowing("getInt"); + try { + super.testGetObjectInt(); + fail("Should have blown up"); + } catch (LoadException e) { + assertEquals("ResultSet bombed", e.innermostException().getMessage()); + } finally { + ThrowingResultSet.stopThrowing("getInt"); + } } public void testGetObjectInteger() { |