protected void tearDown() { if (iSession != null) { try { iSession.destroySession(); } catch (StorageException se) { // No can do System.out.println("TearDown failed: " + se.toString()); } } }
private void executeToStorage(String aUid, String aValue) { try { iSession.open(); iSession.startTransaction(); String tableName = APPLICATION_PACKAGE_TABLE; StorageEntry entry = new StorageEntry(); entry.addAttribute(new StorageAttribute(VENDOR, aValue)); assertTrue("Populate failed", iJtu.populate(iSession, tableName, aUid, entry)); assertTrue("Check failed", iJtu.checkParams(iSession, tableName, entry, 1)); // Utils add ID to entry entry.removeAttribute(ID); assertTrue("Remove failed", iJtu.remove(iSession, tableName, aUid, entry)); iSession.rollbackTransaction(); iSession.close(); } catch (Throwable t) { iSession.rollbackTransaction(); iSession.close(); assertTrue("UnExp exp1: " + t.toString(), false); } }