(this post explains WHY I would like to do this: Good templates for the beans modular test form that have annotation-based validation in Spring MVC )
Is it considered good practice to write unit test to just check the configuration / annotations in a field or class? For example, if you have:
@AnnotatedClass public class MyClass { @AnnotatedField1 @AnnotatedField2 private string myField; }
Does it make sense to write a unit test that checks for annotations above?
The main answer is: "Yes - great to check annotations in unit tests"
: " ". , " " /.
"" , , , , " ", "" - , "" .
- ( ) - , , , . , , , unit test.
, . . , Java- . DB, JSR, GWT UiFields .. .
? , , , , ? , , .
. .