1 5 package org.exoplatform.services.database.test; 6 7 import org.exoplatform.container.PortalContainer; 8 import org.exoplatform.services.database.DatabaseService; 9 import org.exoplatform.services.database.HibernateService ; 10 import org.exoplatform.test.BasicTestCase; 11 18 public class TestDatabaseService extends BasicTestCase { 19 DatabaseService service_ ; 20 HibernateService hservice_ ; 21 public TestDatabaseService(String name) { 22 super(name); 23 } 24 25 public void setUp() throws Exception { 26 PortalContainer pcontainer = PortalContainer.getInstance() ; 27 service_ = (DatabaseService) pcontainer.getComponentInstanceOfType(DatabaseService.class) ; 28 hservice_ = (HibernateService)pcontainer.getComponentInstanceOfType(HibernateService.class) ; 29 } 30 31 public void testDabaseService() throws Exception { 32 assertTrue("Expect database service instance" , service_ != null) ; 33 assertTrue("Expect hibernate service instance" , hservice_ != null) ; 34 } 35 36 protected String getDescription() { 37 return "Test Database Service" ; 38 } 39 } 40 | Popular Tags |