use of org.eclipse.persistence.internal.helper.NonSynchronizedVector in project eclipselink by eclipse-ee4j.
the class joNijijoTestSet method runQuery.
@SuppressWarnings("unchecked")
@Test
public void runQuery() {
DatabaseSession s = project.createDatabaseSession();
s.dontLogMessages();
s.login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add(100);
queryArgs.add(101);
boolean worked = false;
String msg = null;
try {
o = s.executeQuery("joNijiNo", Empty.class, queryArgs);
worked = true;
} catch (Exception e) {
msg = e.getMessage();
}
assertTrue("invocation joNijiNo failed: " + msg, worked);
Vector results = (Vector) o;
DatabaseRecord record = (DatabaseRecord) results.get(0);
String y = (String) record.get("X");
assertTrue("wrong y value", y.equals("test"));
Integer aa = (Integer) record.get("AA");
assertTrue("wrong aa value", aa == 1);
s.logout();
}
use of org.eclipse.persistence.internal.helper.NonSynchronizedVector in project eclipselink by eclipse-ee4j.
the class joNijioTestSet method runQuery.
@SuppressWarnings("unchecked")
@Test
public void runQuery() {
DatabaseSession s = project.createDatabaseSession();
s.dontLogMessages();
s.login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add(1);
queryArgs.add("test");
boolean worked = false;
String msg = null;
try {
o = s.executeQuery("joNijio", Empty.class, queryArgs);
worked = true;
} catch (Exception e) {
msg = e.getMessage();
}
assertTrue("invocation joNijio failed: " + msg, worked);
Vector results = (Vector) o;
DatabaseRecord record = (DatabaseRecord) results.get(0);
BigDecimal x = (BigDecimal) record.get("X");
assertTrue("wrong x value", x.intValue() == 51);
String z = (String) record.get("Z");
assertTrue("wrong z value", z.equals("test-thingie"));
s.logout();
}
use of org.eclipse.persistence.internal.helper.NonSynchronizedVector in project eclipselink by eclipse-ee4j.
the class jiNiTestSet method runQuery.
@SuppressWarnings("unchecked")
@Test
public void runQuery() {
DatabaseSession s = project.createDatabaseSession();
s.dontLogMessages();
s.login();
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add("test");
queryArgs.add(0);
boolean worked = false;
String msg = null;
try {
s.executeQuery("jiNi", Empty.class, queryArgs);
worked = true;
} catch (Exception e) {
msg = e.getMessage();
}
assertTrue("invocation jiNi failed: " + msg, worked);
s.logout();
}
use of org.eclipse.persistence.internal.helper.NonSynchronizedVector in project eclipselink by eclipse-ee4j.
the class jiNioTestSet method runQuery.
@SuppressWarnings("unchecked")
@Test
public void runQuery() {
DatabaseSession s = project.createDatabaseSession();
s.dontLogMessages();
s.login();
Object o = null;
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add("test");
queryArgs.add(1);
boolean worked = false;
String msg = null;
try {
o = s.executeQuery("jiNio", Empty.class, queryArgs);
worked = true;
} catch (Exception e) {
msg = e.getMessage();
}
assertTrue("invocation jiNio failed: " + msg, worked);
Vector results = (Vector) o;
DatabaseRecord record = (DatabaseRecord) results.get(0);
Integer bool2int = (Integer) record.get("Y");
assertTrue("wrong bool2int value", bool2int == 0);
s.logout();
}
use of org.eclipse.persistence.internal.helper.NonSynchronizedVector in project eclipselink by eclipse-ee4j.
the class NijijiNiTestSet method runQuery.
@SuppressWarnings("unchecked")
@Test
public void runQuery() {
DatabaseSession s = project.createDatabaseSession();
s.dontLogMessages();
s.login();
Vector queryArgs = new NonSynchronizedVector();
queryArgs.add(0);
queryArgs.add("test");
queryArgs.add(Float.parseFloat("12.75"));
queryArgs.add(13);
boolean worked = false;
String msg = null;
try {
s.executeQuery("NijijiNi", Empty.class, queryArgs);
worked = true;
} catch (Exception e) {
msg = e.getMessage();
}
assertTrue("invocation nijijini failed: " + msg, worked);
s.logout();
}
Aggregations