protected void initGroups(Class<?> annotationClass) {
//
// Init groups
//
{
ITestOrConfiguration annotation =
(ITestOrConfiguration) getAnnotationFinder().findAnnotation(getMethod(),
annotationClass);
ITestOrConfiguration classAnnotation =
(ITestOrConfiguration) getAnnotationFinder().findAnnotation(getMethod().getDeclaringClass(),
annotationClass);
setGroups(getStringArray(null != annotation ? annotation.getGroups() : null,
null != classAnnotation ? classAnnotation.getGroups() : null));
}
//
// Init groups depended upon
//
{
ITestOrConfiguration annotation =
(ITestOrConfiguration) getAnnotationFinder().findAnnotation(getMethod(),
annotationClass);
ITestOrConfiguration classAnnotation =
(ITestOrConfiguration) getAnnotationFinder().findAnnotation(getMethod().getDeclaringClass(),
annotationClass);
setGroupsDependedUpon(
getStringArray(null != annotation ? annotation.getDependsOnGroups() : null,
null != classAnnotation ? classAnnotation.getDependsOnGroups() : null));
String[] methodsDependedUpon =
getStringArray(null != annotation ? annotation.getDependsOnMethods() : null,
null != classAnnotation ? classAnnotation.getDependsOnMethods() : null);
// Qualify these methods if they don't have a package
for (int i = 0; i < methodsDependedUpon.length; i++) {
String m = methodsDependedUpon[i];
if (m.indexOf(".") < 0) {
m = MethodHelper.calculateMethodCanonicalName(m_methodClass, methodsDependedUpon[i]);