Home | History | Annotate | Download | only in annotationtransformer
      1 package test.annotationtransformer;
      2 
      3 import org.testng.IAnnotationTransformer;
      4 import org.testng.annotations.ITestAnnotation;
      5 import org.testng.annotations.Test;
      6 
      7 import java.lang.reflect.Constructor;
      8 import java.lang.reflect.Method;
      9 
     10 public class AnnotationTransformerInTestngXml implements IAnnotationTransformer {
     11 
     12   @Test(enabled = false)
     13   public void shouldRunAfterTransformation() {}
     14 
     15   @Override
     16   public void transform(ITestAnnotation annotation, Class testClass,
     17       Constructor testConstructor, Method testMethod) {
     18     annotation.setEnabled(true);
     19   }
     20 }
     21