01: package test.factory;
02:
03: import org.testng.annotations.*;
04:
05: import java.util.HashMap;
06: import java.util.Map;
07:
08: /**
09: * 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<Integer, Integer>();
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 = new Integer(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: }
|