Home | History | Annotate | Download | only in annotations
      1 package org.testng.annotations;
      2 
      3 import static java.lang.annotation.ElementType.TYPE;
      4 
      5 import com.google.inject.Module;
      6 
      7 import org.testng.IModuleFactory;
      8 
      9 import java.lang.annotation.Retention;
     10 import java.lang.annotation.Target;
     11 
     12 /**
     13  * This annotation specifies what Guice modules should be used to instantiate
     14  * this test class.
     15  *
     16  * @author Cedric Beust <cedric (at) beust.com>
     17  */
     18 @Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
     19 @Target(TYPE)
     20 public @interface Guice {
     21   /**
     22    * @return the list of modules to query when trying to create an instance of this test class.
     23    */
     24   Class<? extends Module>[] modules() default {};
     25 
     26   Class<? extends IModuleFactory> moduleFactory() default IModuleFactory.class;
     27 }
     28