KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > database > test > TestDatabaseService


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

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 /*
12  * Thu, May 15, 2003 @
13  * @author: Tuan Nguyen
14  * @version: $Id: TestDatabaseService.java,v 1.2 2004/09/14 22:17:46 tuan08 Exp $
15  * @since: 0.0
16  * @email: tuan08@yahoo.com
17  */

18 public class TestDatabaseService extends BasicTestCase {
19   DatabaseService service_ ;
20   HibernateService hservice_ ;
21   public TestDatabaseService(String JavaDoc name) {
22     super(name);
23   }
24
25   public void setUp() throws Exception JavaDoc {
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 JavaDoc {
32     assertTrue("Expect database service instance" , service_ != null) ;
33     assertTrue("Expect hibernate service instance" , hservice_ != null) ;
34   }
35   
36   protected String JavaDoc getDescription() {
37     return "Test Database Service" ;
38   }
39 }
40
Popular Tags