1 5 package org.exoplatform.services.portal.test; 6 7 import java.util.List ; 8 import org.exoplatform.container.PortalContainer; 9 import org.exoplatform.services.portal.community.CommunityConfigService ; 10 import org.exoplatform.services.portal.community.CommunityPortal; 11 import org.exoplatform.services.portal.community.CommunityNavigation ; 12 import org.exoplatform.test.BasicTestCase; 13 20 public class TestCommunityConfigService extends BasicTestCase { 21 CommunityConfigService service_ ; 22 23 public TestCommunityConfigService(String name) { 24 super(name); 25 } 26 27 public void setUp() throws Exception { 28 PortalContainer manager = PortalContainer.getInstance(); 29 service_ = (CommunityConfigService) manager.getComponentInstanceOfType(CommunityConfigService.class) ; 30 } 31 32 public void testCommunityService() throws Exception { 33 CommunityPortal cp = service_.findCommunityPortal("demo") ; 34 assertTrue("expect community portal for /user", cp != null) ; 35 36 List list = service_.findCommunityNavigation("demo") ; 37 assertTrue("expect one shared navigations", list.size() == 1) ; 38 } 39 40 protected String getDescription() { 41 return "Test Converter" ; 42 } 43 } | Popular Tags |