Home | History | Annotate | Download | only in factory
      1 package test.factory;
      2 
      3 
      4 import org.testng.annotations.Factory;
      5 
      6 import java.util.ArrayList;
      7 import java.util.List;
      8 
      9 public class FactoryOrderTest {
     10 
     11    public FactoryOrderTest() {
     12 //       System.out.println("inside testFactory constructor");
     13    }
     14 
     15    @Factory
     16    public static Object[] testF()
     17    throws Exception {
     18        List result = new ArrayList();
     19 //       System.out.println("inside factory: ");
     20        int i = 0;
     21        while (i < 5) {
     22            result.add(new FactoryOrderSampleTest(i));
     23            i++;
     24        }
     25        return result.toArray();
     26    }
     27 }