Author: ozizka(a)redhat.com
Date: 2009-07-28 12:23:01 -0400 (Tue, 28 Jul 2009)
New Revision: 601
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connectors/ConnectorsTest.java
Log:
* Connector test - "manual" url parsing - java.net.URL can't handle generic
URLs.
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connectors/ConnectorsTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connectors/ConnectorsTest.java 2009-07-28
16:14:40 UTC (rev 600)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/connectors/ConnectorsTest.java 2009-07-28
16:23:01 UTC (rev 601)
@@ -8,6 +8,7 @@
import org.jboss.jopr.jsfunit.*;
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.apache.commons.lang.StringUtils;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.*;
@@ -63,8 +64,11 @@
Set<String> presentNodeNames = new HashSet(childNodes.size());
for (NavTreeNode navTreeNode : childNodes) {
String nodeLabel = navTreeNode.getLabelLink().getTextContent().trim();
- URL url = new URL(nodeLabel);
- presentNodeNames.add(url.getProtocol());
+ //URL url = new URL(nodeLabel);
+ //presentNodeNames.add(url.getProtocol());
+ // java.net.MalformedURLException: unknown protocol: ajp
+ String protocol = StringUtils.substringBefore( nodeLabel, "://" );
+ presentNodeNames.add( protocol );
}
assertTrue( "Connectors node should contain a subnode for AJP protocol.",
presentNodeNames.contains("ajp") );
Show replies by date