1 19 20 27 28 package DataLoaderTests.DataObjectTest; 29 30 import junit.framework.*; 31 import org.netbeans.junit.*; 32 33 public class DataObjectTest_manipulation extends NbTestCase { 34 35 36 public DataObjectTest_manipulation(java.lang.String testName) { 37 super(testName); 38 } 39 40 41 public static void main(java.lang.String [] args) { 42 junit.textui.TestRunner.run(suite()); 43 } 44 45 46 public static Test suite() { 47 NbTestSuite suite = new NbTestSuite(DataObjectTest_manipulation.class); 48 return suite; 49 } 50 51 DataObjectTest DOT = null; 53 54 55 58 void prepare() { 59 try { 60 DOT = new DataObjectTest(getName()); 65 System.out.println("Name: " + DOT.getName()); 66 if (NAME.endsWith(".")) { 69 NAME = NAME.substring(0,NAME.length()-1); 70 } 71 DOT.prepare(); 72 } catch (Exception e) { 73 e.printStackTrace(); 74 e.printStackTrace(getRef()); 75 assertTrue("Initialization of test failed! ->" + e,false); 76 } 77 } 78 79 82 void clean() { 83 DOT.clean(); 84 } 85 86 90 void dummyWait(int millis) { 91 try { 92 Thread.sleep(millis); 93 } catch (Exception ex) { 94 DOT.printException(ex); 95 } 96 } 97 98 101 public void testDOManipulation() throws Exception { 102 103 prepare(); 104 log("dataDir " + getDataDir()); 105 log("resource:" + NAME); 109 DOT.checkManipulationOperations(DataObjectTest.findResource(NAME)); 110 clean(); 111 115 assertTrue("Manipulation test failed!",DOT.successful); 116 } 117 118 public static final boolean PRINT_EXCEPTIONS = true; 120 121 public static final String PASSED = "passed.\n"; 122 public static final String FAILED = "failed.\n"; 123 124 protected String NAME = "/DataObjects/JavaSourceObject.java";} 126 | Popular Tags |