@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());
}
}
java类org.testng.annotations.IConfigurationAnnotation的实例源码
ChainedListener.java 文件源码
项目:TestNG-Foundation
阅读 31
收藏 0
点赞 0
评论 0
TestTransformerListener.java 文件源码
项目:carbon-platform-integration
阅读 23
收藏 0
点赞 0
评论 0
@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);
}
}
}
QAFTestNGListener.java 文件源码
项目:qaf
阅读 31
收藏 0
点赞 0
评论 0
@SuppressWarnings("rawtypes")
public void transform(IConfigurationAnnotation iConfigurationAnnotation, Class arg1,
Constructor arg2, Method arg3) {
}
AnnotationTransformer.java 文件源码
项目:seletest
阅读 29
收藏 0
点赞 0
评论 0
@Override
@SuppressWarnings("rawtypes")
public void transform(IConfigurationAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) {
// TODO Auto-generated method stub
}