Home | History | Annotate | Download | only in annotationtransformer
      1 package test.annotationtransformer;
      2 
      3 import org.testng.IAnnotationTransformer2;
      4 import org.testng.annotations.IConfigurationAnnotation;
      5 import org.testng.annotations.IDataProviderAnnotation;
      6 import org.testng.annotations.IFactoryAnnotation;
      7 import org.testng.annotations.ITestAnnotation;
      8 
      9 import java.lang.reflect.Constructor;
     10 import java.lang.reflect.Method;
     11 
     12 public class FactoryTransformer implements IAnnotationTransformer2 {
     13 
     14   @Override
     15   public void transform(IConfigurationAnnotation annotation, Class testClass,
     16       Constructor testConstructor, Method testMethod)
     17   {
     18   }
     19 
     20   @Override
     21   public void transform(IDataProviderAnnotation annotation, Method testMethod) {
     22   }
     23 
     24   @Override
     25   public void transform(ITestAnnotation annotation, Class testClass,
     26       Constructor testConstructor, Method testMethod)
     27   {
     28   }
     29 
     30   @Override
     31   public void transform(IFactoryAnnotation annotation, Method testMethod) {
     32     annotation.setDataProvider("dataProvider");
     33   }
     34 }
     35