Commit fd8b1539 authored by Dave Cramer's avatar Dave Cramer

added empty result set testing

parent 6e2fab0a
...@@ -63,4 +63,24 @@ public class ResultSetTest extends TestCase ...@@ -63,4 +63,24 @@ public class ResultSetTest extends TestCase
stmt.close(); stmt.close();
} }
public void testEmptyResult()
{
try
{
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM testrs where id=100");
rs.beforeFirst();
rs.afterLast();
assertTrue(!rs.first());
assertTrue(!rs.last());
assertTrue(!rs.next());
}
catch ( Exception ex )
{
fail( ex.getMessage() );
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment