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