openmrs/openmrs-core — pull request #167 by gsluthra (2012-12-27 12:32:34+00:00)
Title: Trunk 2517 - Write a unit test for ensuring DWR Services don't use @Deprecated

I have introduced a new unit test class which iterates over all classes in DWR package which have Service in their name, and checks for @Deprecated annotation using Reflection APIs.

Some points to check:

a) Does the unit test name have to begin with should in OpenMRS?
b) This isn't really a classic unit test, since it doesn't check code functionality. Its more of a Poka Yoke (mistake proofing). Its a good idea!!
c) When the test fails, it prints the classes where it found @Deprecated annotation.
d) I only check methods which are "declared" in the Service classes (and not the ones which are inherited). Hopefully, that is OK.