01: package test.objectfactory;
02:
03: import java.lang.reflect.Constructor;
04:
05: import org.testng.internal.ObjectFactoryImpl;
06:
07: /**
08: * @author Hani Suleiman
09: * Date: Mar 6, 2007
10: * Time: 3:53:28 PM
11: */
12: public class LoggingObjectFactory extends ObjectFactoryImpl {
13: public static int invoked;
14:
15: public Object newInstance(Constructor constructor, Object... params) {
16: invoked++;
17: return super.newInstance(constructor, params);
18: }
19: }
|