1 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 18 public class TestHibernateForumServiceNoCache extends ForumServiceTestCase { 19 private BackupService bservice_ ; 20 21 public TestHibernateForumServiceNoCache(String name) { 22 super(name); 23 } 24 25 public void setUp() throws Exception { 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 { 36 bservice_.exportServiceData() ; 37 System.err.println(bservice_.getExportLogger().getTextSummary()) ; 38 } 39 40 public void runImportData() throws Exception { 41 bservice_.importServiceData() ; 42 System.err.println(bservice_.getImportLogger().getTextSummary()) ; 43 } 44 45 protected String getDescription() { 46 return "Test hibernate forum Service No cache" ; 47 } 48 } 49 | Popular Tags |