Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/core/Server/src/org/litesoft/or/TestSupport.java

Diff revisions: vs.
  @@ -10,8 +10,7 @@
10 10 import org.litesoft.orsup.nonpublic.*;
11 11 import org.litesoft.sql.*;
12 12
13 - public class TestSupport
14 - {
13 + public class TestSupport {
15 14 public static final String[] NON_JDBC_CONFIGURATION = //
16 15 { //
17 16 // Block Sizing (HI/LOW)
  @@ -38,20 +37,17 @@
38 37 // "databaseConnectionPoolDisable", "true", //
39 38 };
40 39
41 - public static void initializeConfiguration()
42 - {
43 - if ( !Configuration.isInstantiated() )
44 - {
45 - new ServerConfiguration( new MapConfigDataAccessorFactory( NON_JDBC_CONFIGURATION, "Memory", HSQL_CONFIGURATION ) ); // force creation & self registration of Configuration
40 + public static void initializeConfiguration() {
41 + if ( !Configuration.isInstantiated() ) {
42 + new ServerConfiguration( new MapConfigDataAccessorFactory( NON_JDBC_CONFIGURATION, "Memory",
43 + HSQL_CONFIGURATION ) ); // force creation & self registration of Configuration
46 44 LoggerFactory.init( new ConfigurationLoggerLevel() );
47 45 }
48 46 }
49 47
50 48 public static void beforeClass( MetaDataRegistry pRegistry )
51 - throws Exception
52 - {
53 - try
54 - {
49 + throws Exception {
50 + try {
55 51 initializeConfiguration();
56 52 DataStoreLocator.uninitialize();
57 53 DataStoreBaseSQL zMasterDataStore = new DataStoreBaseSQL( pRegistry );
  @@ -59,25 +55,21 @@
59 55
60 56 new DemoDataStoreManager( zMasterDataStore, pRegistry, 10 );
61 57 }
62 - catch ( Throwable e )
63 - {
58 + catch ( Throwable e ) {
64 59 System.out.println( "failed in beforeClass for SampleTest " + e );
65 60 throw new RuntimeException( e );
66 61 }
67 62 }
68 63
69 - public static void afterClass()
70 - {
64 + public static void afterClass() {
71 65 DataStore zDataStore = DataStoreLocator.get();
72 - if ( zDataStore != null )
73 - {
66 + if ( zDataStore != null ) {
74 67 zDataStore.dropAllTables();
75 68 DataStoreLocator.uninitialize();
76 69 }
77 70 }
78 71
79 - public static void beforeTest()
80 - {
72 + public static void beforeTest() {
81 73 ServerContext.clearAllServerStores();
82 74
83 75 ContextID zContextID = new ContextID( "Test", "Test" );