KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > portal > test > TestCommunityConfigService


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.portal.test;
6
7 import java.util.List JavaDoc ;
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 /**
14  * Thu, May 15, 2003 @
15  * @author: Tuan Nguyen
16  * @version: $Id: TestConverter.java,v 1.6 2004/07/20 12:41:09 tuan08 Exp $
17  * @since: 0.0
18  * @email: tuan08@yahoo.com
19  */

20 public class TestCommunityConfigService extends BasicTestCase {
21   CommunityConfigService service_ ;
22   
23   public TestCommunityConfigService(String JavaDoc name) {
24     super(name);
25   }
26
27   public void setUp() throws Exception JavaDoc {
28     PortalContainer manager = PortalContainer.getInstance();
29     service_ = (CommunityConfigService) manager.getComponentInstanceOfType(CommunityConfigService.class) ;
30   }
31   
32   public void testCommunityService() throws Exception JavaDoc {
33     CommunityPortal cp = service_.findCommunityPortal("demo") ;
34     assertTrue("expect community portal for /user", cp != null) ;
35     
36     List JavaDoc list = service_.findCommunityNavigation("demo") ;
37     assertTrue("expect one shared navigations", list.size() == 1) ;
38   }
39   
40   protected String JavaDoc getDescription() {
41     return "Test Converter" ;
42   }
43 }
Popular Tags