Exemplo n.º 1
0
 public void doRelease() {
   try {
     dc.destroySelf();
   } catch (SQLException ignore) {
     ignore.printStackTrace();
   }
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
  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));
  }
Exemplo n.º 4
0
 public void testJSONHandler() throws Exception {
   Rows rows = dc.createUserProcedure("sample@selectEmpBy()").execQuery();
   JsonObject jso = (JsonObject) rows.toHandle(new JSONHandler());
   Debug.debug(jso);
 }
Exemplo n.º 5
0
 @Override
 protected void tearDown() throws Exception {
   dc.destroySelf();
   super.tearDown();
 }