I'm currently unit testing some GWT RPC services with unit tests extending GWTTestCase. All the testcases basically rely on test data being available in the persisted store. I cant set this up from the GWTTestCase since GWT complains about the hibernate objects not being serializable(i suppose the entire class gets compiled into javascript, and not just the actual testcase).
I could obviously just insert it into the database and leave it, but I don't really like that solution.
Currently, I added some methods to the RPC services that basically sets up the service for testing, and one that removes everything. Again, I think this is a bad solution. I would love to be able to use the normal @BeforeClass and @AfterClass annotations I use when unittesting the domain model. Can anybody share their experiences with GWTTestCase GWT RPC implementations and how you populate you persistent store with data before the testcases gets run.
-Daniel