public void testDelete5() throws SQLException {
  statement.execute("DELETE FROM " + DatabaseCreator.PARENT_TABLE + " WHERE id = 1;");
  ResultSet r=statement.executeQuery("SELECT COUNT(*) FROM " + DatabaseCreator.FKCASCADE_TABLE + " WHERE name_id = 1;");
  r.next();
  assertEquals("Should be no rows",0,r.getInt(1));
  r.close();
}

public void testDelete5 ( ) throws SQLException { statement . execute ( "DELETE FROM " + DatabaseCreator . PARENT_TABLE + " WHERE id = 1;" ) ; ResultSet r = statement . executeQuery ( "SELECT COUNT(*) FROM " + DatabaseCreator . FKCASCADE_TABLE + " WHERE name_id = 1;" ) ; r . next ( ) ; assertEquals ( "Should be no rows" , 0 , r . getInt ( 1 ) ) ; r . close ( ) ; }
deletefunctionalitytest # testdelete5 ( ) . attempts to delete row with referencing ones and cascade action - expecting all referencing rows will also be deleted
