KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > communication > forum > test > TestHibernateForumServiceNoCache


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.communication.forum.test;
6
7 import org.exoplatform.container.PortalContainer;
8 import org.exoplatform.services.backup.BackupService;
9 import org.exoplatform.services.communication.forum.ForumServiceContainer;
10
11 /*
12  * Thu, May 15, 2003 @
13  * @author: Tuan Nguyen
14  * @version: $Id: TestHibernateForumServiceNoCache.java,v 1.6 2004/07/29 14:09:47 tuan08 Exp $
15  * @since: 0.0
16  * @email: tuan08@yahoo.com
17  */

18 public class TestHibernateForumServiceNoCache extends ForumServiceTestCase {
19   private BackupService bservice_ ;
20   
21   public TestHibernateForumServiceNoCache(String JavaDoc name) {
22     super(name);
23   }
24
25   public void setUp() throws Exception JavaDoc {
26     if (service_ == null) {
27       PortalContainer manager = PortalContainer.getInstance();
28       container_ =
29         (ForumServiceContainer) manager.getComponentInstanceOfType(ForumServiceContainer.class) ;
30       service_ = container_.findForumService("exo") ;
31       bservice_ = (BackupService) manager.getComponentInstanceOfType(BackupService.class) ;
32     }
33   }
34
35   public void runExportData() throws Exception JavaDoc {
36     bservice_.exportServiceData() ;
37     System.err.println(bservice_.getExportLogger().getTextSummary()) ;
38   }
39   
40   public void runImportData() throws Exception JavaDoc {
41     bservice_.importServiceData() ;
42     System.err.println(bservice_.getImportLogger().getTextSummary()) ;
43   }
44   
45   protected String JavaDoc getDescription() {
46     return "Test hibernate forum Service No cache" ;
47   }
48 }
49
Popular Tags