Java 类org.testng.annotations.IConfigurationAnnotation 实例源码

项目:TestNG-Foundation    文件:ChainedListener.java   
@SuppressWarnings("rawtypes")
@Override
public void transform(IConfigurationAnnotation annotation, Class testClass,
                Constructor testCtor, Method testMethod) {

    if (testClass != null) {
        xformConfig.add("class: " + testClass.getSimpleName());
    } else if (testCtor != null) {
        xformConfig.add("ctor: " + testCtor.getName());
    } else {
        xformConfig.add("method: " + testMethod.getName());
    }
}
项目:carbon-platform-integration    文件:TestTransformerListener.java   
@Override
public void transform(IConfigurationAnnotation iConfigurationAnnotation, Class aClass,
                      Constructor constructor, Method method) {
    if (method != null) {
        try {
            context = new AutomationContext();
            Annotation classAnnotation = method.getDeclaringClass().getAnnotation(SetEnvironment.class);
            Annotation methodAnnotation = method.getAnnotation(SetEnvironment.class);
            log.info("Started Configuration Transform manager  " + method.getName());
            //skip configuration methods if class level custom annotation is set.
            if (classAnnotation != null) {
                if (!annotationComparator(classAnnotation.toString())) {
                    iConfigurationAnnotation.setEnabled(false);
                    log.info("Skipped Configuration method <" + method.getName() + "> on " +
                            "annotation <" + classAnnotation.toString() + ">");
                }
                //skip configuration methods if configuration method level custom annotation is set.
            } else if (methodAnnotation != null) {
                if (!annotationComparator(methodAnnotation.toString())) {
                    iConfigurationAnnotation.setEnabled(false);
                    log.info("Skipped Configuration method <" + method.getName() + "> on " +
                            "annotation <" + methodAnnotation.toString() + ">");
                }
            }
        } catch (Exception e) {
            handleException("Error transform custom annotations ", e);
        }
    }
}
项目:qaf    文件:QAFTestNGListener.java   
@SuppressWarnings("rawtypes")
public void transform(IConfigurationAnnotation iConfigurationAnnotation, Class arg1,
        Constructor arg2, Method arg3) {
}
项目:seletest    文件:AnnotationTransformer.java   
@Override
@SuppressWarnings("rawtypes")
public void transform(IConfigurationAnnotation annotation,  Class testClass, Constructor testConstructor, Method testMethod) {
    // TODO Auto-generated method stub
}