blob: 4eaa6796e0d9a1d0b67f7782feb454a760a85a26 [file] [log] [blame]
package test.annotationtransformer;
import org.testng.internal.annotations.IAnnotationTransformer2;
import org.testng.internal.annotations.IConfiguration;
import org.testng.internal.annotations.IDataProvider;
import org.testng.internal.annotations.ITest;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
public class ConfigurationTransformer implements IAnnotationTransformer2 {
public void transform(ITest annotation, Class testClass,
Constructor testConstructor, Method testMethod)
{
}
public void transform(IConfiguration annotation, Class testClass,
Constructor testConstructor, Method testMethod)
{
if (annotation.getBeforeTestMethod()) {
System.out.println("disabling " + testMethod + " "
+ testMethod.hashCode()
+ " " + annotation.hashCode());
annotation.setEnabled(false);
}
}
public void transform(IDataProvider annotation, Method testMethod) {
}
}