Is there an environment that supports the creation of some standard unit tests from annotations? An example of what I mean is:
@HasPublicDefaultConstructor public class Foo { }
This will obviously be used to automatically create a unit test, which checks if Foo has a default constructor. Am I the only person who was still thinking something about this ?;) Although I am most interested in Java, solutions in other languages ββwill certainly be interesting as well.
EDIT: In response to S. Lott's answer, let me clarify:
I am trying to check if a class has a default constructor. (Of course, this is just an example.) I could just do it by writing a test, but I find it rather tedious. So I'm looking for a tool that handled annotations at compile time (via APT) and would generate a test for me. Does something like this exist? If not, do you think this is a good idea?
java unit-testing annotations code-generation automation
Kim stebel
source share