@Test public void testGetInfoResultSet() { try { stmt = conn.prepareStatement(ALLEGATO5_FIND_BYPK); stmt.setInt(1, 6); ResultSet rs = stmt.executeQuery(); rs.next(); allegato5 = Allegato5Assembler.getInfo(rs); stmt.close(); db.closeConnection(conn); } catch (SQLException e) { fail(e.getMessage()); } catch (DBAccessException e) { fail(e.getMessage()); } }
@Test public void testGetInfoRowSet() { CachedRowSet rws; try { rws = new CachedRowSetImpl(); rws.setCommand(ALLEGATO5_FIND_BYPK); rws.setInt(1, 6); rws.execute(conn); rws.next(); allegato5 = Allegato5Assembler.getInfo(rws); rws.close(); db.closeConnection(conn); } catch (SQLException e) { fail(e.getMessage()); } catch (DBAccessException e) { fail(e.getMessage()); } }