I\'m trying to build an automatic testing framework (based on jUnit, but that\'s no important) for my students\' homework. They will have to create constructors for some cla
If you haven't used mocking frameworks (like ezmock) I highly recommend you give one a try.
I may be wrong and that may not help you at all, but from what I could gather from your post it seems possible that mocking may be exactly what you are looking for (Even though I recognize that it has nothing to do with what you asked for.
Edit: In response to comment.
No, Modern mocking frameworks allow you to create a "Fake" instance of any class from "nothing" and pass it around as though it was an instance of the class. It doesn't need an interface, it can be any class. Also methods can be scripted to return a sequence of values from a simple always return "7" to "When called with an arg=7 return 5 the first call, 6 the second and 7 the third".
It's usually used in conjunction with testing frameworks to give a reference class to pass to the class you are testing.
This may not be exactly what you are looking for, but you mentioned unit testing and manually initializing variables so it seemed like this is something that may eventually come in handy.