db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: dropping a schema, shutting down and restarting in unit test run
Date Sat, 05 Apr 2008 16:13:17 GMT
> I have a simple requirement in my unit test run to run integration tests 
> on my java application's persistence layer.
> 
> Each test must (1) create the schema, (2) insert the fresh test data, 
> (3) run the test and (4) clean up and remove the database.

Have a look at CleanDatabaseTestSetup.java in the Derby source tree.
Derby's built-in JUnit tests do almost the same thing as you describe,
so it is a very common pattern in that code.

Browse around there and you should find some good examples of coding
patterns for these tasks.

thanks,

bryan


Mime
View raw message