Java is better than .NET

Back at Trimble, I wanted to write some unit tests for our DAO stuff, so I came up with this crazy scheme to run a test SQL server on the local machine. I had all this custom code set up to prep the database for the test, then run the tests.

In Java, I am using a HypersonicSQL (is it even called that anymore?) in-memory database to do testing. It’s really fast since it doesn’t write to disk, and every time you run the tests, you have a fresh database. You just inject the HSQL config into the HibernateUtil class and run the tests.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s