KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > portletcontainer > imp > TestXPPParser


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.portletcontainer.imp;
6
7 import java.io.InputStream JavaDoc;
8 import java.net.URL JavaDoc;
9 import org.exoplatform.services.portletcontainer.impl.config.*;
10 import org.exoplatform.services.portletcontainer.pci.model.PortletApp;
11 import org.exoplatform.test.BasicTestCase;
12
13 /**
14  * Thu, May 15, 2003 @
15  * @author: Tuan Nguyen
16  * @version: $Id: TestXPPParser.java,v 1.3 2004/10/29 02:21:50 tuan08 Exp $
17  * @since: 0.0
18  * @email: tuan08@yahoo.com
19  */

20 public class TestXPPParser extends BasicTestCase {
21
22   public TestXPPParser(String JavaDoc name) {
23     super(name);
24   }
25
26   public void setUp() throws Exception JavaDoc { }
27   
28   
29   public void testPortletContainerConfigParser() throws Exception JavaDoc {
30     URL JavaDoc url = new URL JavaDoc("file:./src/java/conf/portal/portlet-container.xml");
31     InputStream JavaDoc is = url.openStream() ;
32     PortletContainer pc = XMLParser.parse(is) ;
33     System.out.println(XMLSerializer.toXML(pc)) ;
34   }
35   
36   public void testPortletAppParser() throws Exception JavaDoc {
37     URL JavaDoc url = new URL JavaDoc("file:./war_template/WEB-INF/portlet.xml");
38     InputStream JavaDoc is = url.openStream() ;
39     PortletApp pa =
40       org.exoplatform.services.portletcontainer.pci.model.XMLParser.parse(is) ;
41   }
42   
43   protected String JavaDoc getDescription() {
44     return "Test Converter" ;
45   }
46 }
Popular Tags