Home | History | Annotate | Download | only in factory
      1 package test.factory;
      2 
      3 import org.testng.annotations.Test;
      4 
      5 import java.util.HashMap;
      6 import java.util.Map;
      7 
      8 /**
      9  * This class is created by FactoryWithInstanceInfoTest2
     10  *
     11  * @author cbeust
     12  */
     13 public class FactoryWithInstanceInfoTest2 {
     14   private static Map<Integer, Integer> m_numbers = new HashMap<>();
     15   private int m_number;
     16 
     17   public FactoryWithInstanceInfoTest2() {
     18     throw new RuntimeException("Shouldn't be invoked");
     19   }
     20 
     21   public static Map<Integer, Integer> getNumbers() {
     22     return m_numbers;
     23   }
     24 
     25   public FactoryWithInstanceInfoTest2(int n) {
     26     m_number = n;
     27   }
     28 
     29   @Test(groups = { "first" })
     30   public void testInt() {
     31     Integer n = m_number;
     32     m_numbers.put(n, n);
     33   }
     34 
     35   private static void ppp(String s) {
     36     System.out.println("[FactoryTest2] " + s);
     37   }
     38 
     39 }
     40