1 19 20 25 26 package org.netbeans.test.java.generating.ConstructorElem; 27 28 import org.netbeans.test.java.Common; 29 import java.lang.reflect.Modifier ; 30 import java.util.Collections ; 31 import org.netbeans.api.java.source.JavaSource; 32 import org.netbeans.junit.*; 33 import org.openide.filesystems.FileObject; 34 import org.openide.loaders.DataObject; 35 36 59 60 61 public class ConstructorElem extends org.netbeans.test.java.XRunner { 62 63 public static void main(java.lang.String [] args) { 64 junit.textui.TestRunner.run(suite()); 65 } 66 67 public ConstructorElem() { 68 super(""); 69 } 70 71 public ConstructorElem(java.lang.String testName) { 72 super(testName); 73 } 74 75 public static NbTest suite() { 76 return new NbTestSuite(ConstructorElem.class); 77 } 78 79 86 public boolean go(Object o, java.io.PrintWriter log) throws Exception { 87 boolean passed = true; 88 FileObject fo = (FileObject) o; 89 JavaSource js = JavaSource.forFileObject(fo); 90 Common.removeConstructors(js); 91 Common.addConstructor(js, Collections.EMPTY_MAP); 92 Common.addConstructor(js, Common.PARS1); 93 Common.addConstructor(js, Common.PARS2); 94 Common.addConstructor(js, Common.PARS3); 95 return true; 96 } 97 98 100 protected void setUp() { 101 super.setUp(); 102 name = "JavaTestSourceConstructorElem"; 103 packageName = "org.netbeans.test.java.testsources"; 104 } 105 106 } 107 | Popular Tags |