1 7 package com.genimen.djeneric.test; 8 9 import junit.extensions.TestSetup; 10 import junit.framework.Test; 11 import junit.framework.TestSuite; 12 13 import com.genimen.djeneric.util.DjLogger; 14 15 18 public class AllTests 19 { 20 21 public static Test suite() 22 { 23 24 TestSuite suite = new TestSuite("Tests for Djeneric"); 25 26 suite.addTest(new TestSuite(TestCreateSession.class)); 28 suite.addTest(new TestSuite(TestSqlParser.class)); 29 suite.addTest(new TestSuite(TestPersistency.class)); 30 32 TestSetup wrapper = new TestSetup(suite) 33 { 34 35 protected void setUp() 36 { 37 oneTimeSetUp(); 38 } 39 40 protected void tearDown() 41 { 42 oneTimeTearDown(); 43 } 44 }; 45 46 return wrapper; 47 } 48 49 public static void oneTimeSetUp() 50 { 51 StartHypersonic.main(null); 52 } 53 54 public static void oneTimeTearDown() 55 { 56 StopHypersonic.main(null); 57 while (StartHypersonic.isRunning()) 58 try 59 { 60 Thread.sleep(500); 61 } 62 catch (InterruptedException e) 63 { 64 DjLogger.log(e); 65 } 66 System.out.println("Hypersonic properly shut down.."); 67 } 68 } | Popular Tags |