Hi,
I'm writing testcases and would like to generate code
to create
test data. I will not be using DbUnit as
we have our own style of doing this.
Basically I have value objects like "User", "Groups", "Category", etc..
In my
Junit test suite; I can do something like this to persist objects to the database.
What I want to do is to generate this code via a script. I was thinking along the lines of:
Each line will be evaluated and code generated in serial fashion. Thus I can use that to implement dependencies.
The data for each value object will be from a properties file. e.g.
Firstly, I am having problems describing relationships in the properties file ? Any other alternatives ?
Secondly the invocation of the setters on the "javabean" value objects should be done via reflection of something cleaner. Any APIs out there in the internet that will do this grunt work ?
Thirdly, is this a good idea in the first place ?
Thanks
Pho