Skip to content

Commit

Permalink
Moved test things
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds authored and kentcdodds committed Jun 4, 2012
1 parent a648885 commit e020dca
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/com/kentcdodds/javahelper/test/TestClass.java
Expand Up @@ -42,17 +42,6 @@ public class TestClass {

public static void main(String[] args) throws Exception {
setStuff();
HelperConnection helperConnection = new HelperConnection(devDatabaseUrl, properties);
helperConnection.addQueryToQueue(new HelperQuery("select * from dual"));
helperConnection.addQueryToQueue(new HelperQuery("select * from dual"));
helperConnection.addQueryToQueue(new HelperQuery("select * from dual"));
helperConnection.addQueryToQueue(new HelperQuery("select * from dual"));
List<HelperQuery> executeQueue = helperConnection.executeQueue();
for (int i = 0; i < executeQueue.size(); i++) {
HelperQuery executedQuery = executeQueue.get(i);
PrinterHelper.println(StringHelper.newline + "Query " + i + StringHelper.newline);
SQLHelper.printResultSet(executedQuery.getResultSet());
}
System.exit(0);
}

Expand All @@ -77,7 +66,21 @@ public static void setStuff() throws IOException {

}

public static void executeOracleQuery() throws SQLException, Exception {
public static void executQueries() throws SQLException {
HelperConnection helperConnection = new HelperConnection(devDatabaseUrl, properties);
helperConnection.addQueryToQueue(new HelperQuery("select * from dual"));
helperConnection.addQueryToQueue(new HelperQuery("select * from dual"));
helperConnection.addQueryToQueue(new HelperQuery("select * from dual"));
helperConnection.addQueryToQueue(new HelperQuery("select * from dual"));
List<HelperQuery> executeQueue = helperConnection.executeQueue();
for (int i = 0; i < executeQueue.size(); i++) {
HelperQuery executedQuery = executeQueue.get(i);
PrinterHelper.println(StringHelper.newline + "Query " + i + StringHelper.newline);
SQLHelper.printResultSet(executedQuery.getResultSet());
}
}

public static void executeAndPrintQuery() throws SQLException, FileNotFoundException, IOException {
Map<String, String> props = new TreeMap<>();
props.put("user", dbUser);
props.put("password", dbPassword);
Expand Down

0 comments on commit e020dca

Please sign in to comment.