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