• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package test.factory;
2 
3 import org.testng.annotations.DataProvider;
4 import org.testng.annotations.Factory;
5 import org.testng.annotations.Test;
6 
7 public class FactoryDataProviderSampleTest extends BaseFactory {
8 
9   @Factory(dataProvider = "dp")
FactoryDataProviderSampleTest(int n)10   public FactoryDataProviderSampleTest(int n) {
11     super(n);
12   }
13 
14   @DataProvider
dp()15   static public Object[][] dp() {
16     return new Object[][] {
17       new Object[] { 41 },
18       new Object[] { 42 },
19     };
20   }
21 
22   @Override
toString()23   public String toString() {
24     return "[FactoryDataProviderSampleTest " + getN() + "]";
25   }
26 
27   @Test
f()28   public void f() {
29 //    System.out.println("Test:" + getN());
30   }
31 }
32