daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Oct 20th, 2018 58 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. try {
  2.         dbAccessSetUp();
  3.         ResultSet rs = stmt.executeQuery("SELECT count(*) as total FROM taddress WHERE address_id = (SELECT address_id FROM tlink WHERE ext_id =" + this.ID + ")");
  4.  
  5.         if(!rs.next()) {
  6.             fail("Record does not exist in taddress");
  7.         }
  8.         int count = 0;
  9.         while(rs.next()) {              
  10.             count = rs.getInt(1);
  11.             System.out.println("number of count : " + count);
  12.             assertTrue(0 < count);
  13.         }
  14.         rs.close();
  15.     } catch(SQLException se) {
  16.         se.printStackTrace();
  17.         assertEquals(true, false);
  18.     } catch(Exception e) {
  19.         e.printStackTrace();
  20.         assertEquals(true, false);
  21.     } finally {
  22.         try {
  23.             if(stmt!=null) stmt.close();  
  24.         } catch(SQLException se2) {
  25.             assertEquals(true, false);
  26.         }
  27.         try {
  28.             if(conn!=null) conn.close();
  29.         } catch(SQLException se) {
  30.             se.printStackTrace();
  31.             assertEquals(true, false);
  32.         }
  33.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top