Visualizing HypersonicDB data in JUnit

We all know that HypersonicDB has a GUI client. But, I could never figure out how to use that client in a JUnit running Hypersonic as a memory-only DB. Until now...


public void startHSQLGUI() {
String[] strings = new String[]{"-driver", "org.hsqldb.jdbcDriver", "-url", "jdbc:hsqldb:mem:appTempl", "-user", "sa", "-password", ""};
DatabaseManagerSwing.main(strings);
}


You need to change the -user and the -password options as appropriate.

Now, put a breakpoint somewhere in your code and fire that method when the breakpoint gets hit (in RAD, I open the "Display" view and execute startHSQLGUI()).

One problem tho...as with most fat client GUIs, closing the GUI apparently issues a System.exit() and will kill the JVM...

1 comment:

  1. Disregard my stupid comment... that doesn't do anything. :)

    ReplyDelete

No corporate specific info, please...