1 21 22 package org.opensubsystems.blog.logic; 23 24 import junit.extensions.TestSetup; 25 import junit.framework.Test; 26 import junit.framework.TestSuite; 27 28 import org.opensubsystems.blog.persist.db.BlogDatabaseSchema; 29 import org.opensubsystems.blog.persist.db.EntryListDatabaseTestUtils; 30 import org.opensubsystems.core.error.OSSException; 31 import org.opensubsystems.core.persist.db.Database; 32 import org.opensubsystems.core.persist.db.DatabaseImpl; 33 import org.opensubsystems.core.persist.db.DatabaseSchemaManager; 34 import org.opensubsystems.core.persist.db.DatabaseTestSetup; 35 import org.opensubsystems.core.persist.db.DatabaseTestSuite; 36 import org.opensubsystems.patterns.listdata.logic.ListControllerTest; 37 38 46 public final class EntryControllerTest 47 { 48 50 53 private EntryControllerTest( 54 ) 55 { 56 } 58 59 61 67 public static Test suite( 68 ) 69 { 70 TestSuite suite = new DatabaseTestSuite("EntryControllerTest"); 71 suite.addTestSuite(EntryControllerTestInternal.class); 72 TestSetup wrapper = new DatabaseTestSetup(suite); 73 74 return wrapper; 75 } 76 77 82 public static class EntryControllerTestInternal extends ListControllerTest 83 { 84 86 89 static 90 { 91 Database dbDatabase; 92 try 93 { 94 dbDatabase = DatabaseImpl.getInstance(); 95 dbDatabase.add(DatabaseSchemaManager.getInstance(BlogDatabaseSchema.class)); 96 } 97 catch (OSSException bfeExc) 98 { 99 throw new RuntimeException ("Unexpected exception.", bfeExc); 100 } 101 } 102 103 109 public EntryControllerTestInternal( 110 String strTestName 111 ) throws Exception 112 { 113 super(strTestName, new EntryListDatabaseTestUtils()); 114 } 115 116 118 } 122 } 123 | Popular Tags |