1 19 20 27 28 package DataLoaderTests.LoaderPoolTest; 29 30 import org.openide.loaders.UniFileLoader; 31 32 public class EXT{ 33 34 35 public EXT() { 36 } 37 38 private static java.io.PrintWriter log = null; 39 private static java.io.PrintWriter ref = null; 40 static boolean successful = true; 41 LoaderPoolTest LPT = null; 42 43 44 45 public static void writeLog(String text) { 46 log.println(text); 47 System.out.println(text); 48 if (text.equals(FAILED)) successful = false; 49 } 50 51 52 public static void writeRef(String text) { 53 ref.println(text); 54 System.out.println(text); 55 if (text.equals(FAILED)) successful = false; 56 } 57 58 59 static void printException(Exception e) { 60 if(PRINT_EXCEPTIONS){ 61 e.printStackTrace(); 62 e.printStackTrace(ref); 63 } 64 } 65 66 69 void prepare() { 70 LPT = new LoaderPoolTest("x"); 71 LPT.prepare(); 72 } 73 74 77 void clean() { 78 LPT.clean(); 79 } 80 81 85 static void dummyWait(int millis) { 86 try { 87 Thread.sleep(millis); 88 } catch (Exception ex) { 89 printException(ex); 90 } 91 } 92 93 public static void main (String args[]) { 94 log = new java.io.PrintWriter (System.err); 95 ref = new java.io.PrintWriter (System.out); 96 97 EXT ext = new EXT(); 98 99 ext.prepare(); 100 101 ext.successful = ext.LPT.refPrintExtensions(ext.LPT.getDataLoader(LOADER)); 103 104 ext.clean(); 105 106 } 109 110 public static final boolean PRINT_EXCEPTIONS = true; 112 113 public static final String PASSED = "passed.\n"; 114 public static final String FAILED = "failed.\n"; 115 116 protected static String LOADER = null; 117 } 118 | Popular Tags |