01: package org.testng.annotations;
02:
03: import static java.lang.annotation.ElementType.METHOD;
04:
05: import java.lang.annotation.Retention;
06: import java.lang.annotation.Target;
07:
08: /**
09: * Mark a method as supplying data for a test method. The data provider name
10: * defaults to method name.
11: * The annotated method must return an Object[][] where each
12: * Object[] can be assigned the parameter list of the test method.
13: * The @Test method that wants to receive data from this DataProvider
14: * needs to use a dataProvider name equals to the name of this annotation.
15: *
16: * @author cbeust
17: */
18: @Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
19: @Target({METHOD})
20: public @interface DataProvider {
21:
22: /**
23: * The name of this DataProvider.
24: */
25: public String name() default "";
26: }
|