public void doRelease() { try { dc.destroySelf(); } catch (SQLException ignore) { ignore.printStackTrace(); } }
public void setUp() throws Exception { // TODO Auto-generated method stub super.setUp(); dc = new DBController( new OracleDBManager("jdbc:oracle:thin:@dev-sql.i-on.net:1521:devSql", "bleu", "redf")); dc.initSelf(); }
public void testAradonQuery() throws Exception { AradonTester at = AradonTester.create().register("", "/query", QueryLet.class); at.getAradon().getServiceContext().putAttribute(IDBController.class.getCanonicalName(), dc); IUserCommand cmd = dc.createUserCommand("select 1 from dual"); ISerialRequest req = AradonClientFactory.create(at.getAradon()).createSerialRequest("/query"); Rows rows = req.post(cmd, Rows.class); assertEquals(1, rows.getRowCount()); assertEquals(1, rows.firstRow().getInt(1)); }
public void testJSONHandler() throws Exception { Rows rows = dc.createUserProcedure("sample@selectEmpBy()").execQuery(); JsonObject jso = (JsonObject) rows.toHandle(new JSONHandler()); Debug.debug(jso); }
@Override protected void tearDown() throws Exception { dc.destroySelf(); super.tearDown(); }