Author: chris.laprun(a)jboss.com
Date: 2009-04-03 15:35:17 -0400 (Fri, 03 Apr 2009)
New Revision: 13149
Modified:
branches/JBoss_Portal_Branch_2_7/core-wsrp/build.xml
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java
Log:
- Adapted test cases to change in behavior with & encoding. Note that & should
still be encoded as & when going through the WS stack (which is not the case for
the tests).
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/build.xml 2009-04-03 14:21:49 UTC (rev
13148)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/build.xml 2009-04-03 19:35:17 UTC (rev
13149)
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
- ~ contributors as indicated by the @authors tag. See the ~
- ~ copyright.txt in the distribution for a full listing of ~
- ~ individual contributors. ~
- ~ ~
- ~ This is free software; you can redistribute it and/or modify it ~
- ~ under the terms of the GNU Lesser General Public License as ~
- ~ published by the Free Software Foundation; either version 2.1 of ~
- ~ the License, or (at your option) any later version. ~
- ~ ~
- ~ This software is distributed in the hope that it will be useful, ~
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
- ~ Lesser General Public License for more details. ~
- ~ ~
- ~ You should have received a copy of the GNU Lesser General Public ~
- ~ License along with this software; if not, write to the Free ~
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -152,10 +152,10 @@
<pathelement location="${project.tools}/lib/explode.jar"/>
<path refid="apache.ant.classpath"/>
</path>
- <taskdef
- name="explode"
- classname="org.jboss.portal.common.ant.Explode"
- classpathref="explode.task.classpath"/>
+ <taskdef
+ name="explode"
+ classname="org.jboss.portal.common.ant.Explode"
+ classpathref="explode.task.classpath"/>
</target>
<!--+====================================================================+-->
@@ -209,11 +209,9 @@
<fileset dir="${jboss/portlet.bridge.lib}"
includes="portletbridge-impl.jar"/>
<fileset dir="${build.lib}"
includes="portal-wsrp-admin-lib.jar"/>
<fileset dir="${jboss.portal-faces.root}/lib"
includes="portal-faces-lib.jar"/>
- <!--<fileset dir="${el.el.lib}"
includes="el-api.jar,el-ri.jar"/>-->
<fileset dir="${apache.lang.lib}"
includes="commons-lang.jar"/>
<fileset dir="${apache.beanutils.lib}"
includes="commons-beanutils.jar"/>
<fileset dir="${apache.digester.lib}"
includes="commons-digester.jar"/>
- <!--<fileset dir="${commons.el.lib}"
includes="commons-el.jar"/>-->
</copy>
<copy todir="${build.wsrp-admin.war}/WEB-INF/lib">
@@ -225,9 +223,9 @@
<fileset dir="${build.resources}/portal-wsrp-admin-war"
includes="**/*"/>
</copy>
- <copy todir="${build.resources}/portal-wsrp-admin.war">
- <fileset dir="${source.bin}/portal-wsrp-admin-war"
includes="**/*"/>
- </copy>
+ <copy todir="${build.resources}/portal-wsrp-admin.war">
+ <fileset dir="${source.bin}/portal-wsrp-admin-war"
includes="**/*"/>
+ </copy>
<jar jarfile="${build.lib}/portal-wsrp-admin.war">
<fileset dir="${build.resources}/portal-wsrp-admin.war"
includes="**/*"/>
@@ -240,7 +238,7 @@
dir="${build.resources}/portal-wsrp-admin-sar"
tofile="${build.lib}/portal-wsrp-admin.sar"/-->
- </target>
+ </target>
<!-- ================================================================== -->
<!-- Cleaning -->
@@ -291,9 +289,9 @@
<target name="package-other-test" description="Generates the other
test artifacts" depends="compile">
<mkdir dir="${build.lib.test}"/>
<jar jarfile="${build.lib.test}/test-other-lib.jar">
- <fileset dir="${build.classes}/">
- <include name="org/jboss/portal/test/wsrp/other/*.class"/>
- </fileset>
+ <fileset dir="${build.classes}/">
+ <include name="org/jboss/portal/test/wsrp/other/*.class"/>
+ </fileset>
</jar>
</target>
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java 2009-04-03
14:21:49 UTC (rev 13148)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/MarkupTestCase.java 2009-04-03
19:35:17 UTC (rev 13149)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -61,7 +61,7 @@
private static final String DEFAULT_MARKUP_PORTLET_WAR =
"test-markup-portlet.war";
public MarkupTestCase()
- throws Exception
+ throws Exception
{
super("MarkupTestCase", DEFAULT_MARKUP_PORTLET_WAR);
}
@@ -115,9 +115,9 @@
MarkupResponse response = markupService.getMarkup(getMarkup);
- checkMarkupResponse(response, "<form method='post'
action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
- "-interactionState=JBPNS_/wsrp_rewrite'
id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock
symbol</t" +
- "d><td><input
name='symbol'/></td></tr><tr><td><input
type='submit'
value='Submit'></td></tr></table></form>");
+ checkMarkupResponse(response, "<form method='post'
action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
+ "-interactionState=JBPNS_/wsrp_rewrite'
id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock
symbol</t" +
+ "d><td><input
name='symbol'/></td></tr><tr><td><input
type='submit'
value='Submit'></td></tr></table></form>");
}
public void testGetMarkupRenderParameters() throws Exception
@@ -155,7 +155,7 @@
// let's see now if we can increment the counter
PerformBlockingInteraction performBlockingInteraction =
-
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getHandleForCurrentlyDeployedArchive());
+
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getHandleForCurrentlyDeployedArchive());
InteractionParams interactionParams =
performBlockingInteraction.getInteractionParams();
interactionParams.setInteractionState(incrementAction.getInteractionState().getStringValue());
markupService.performBlockingInteraction(performBlockingInteraction);
@@ -223,7 +223,7 @@
public void testPerformBlockingInteractionRedirect() throws Exception
{
PerformBlockingInteraction performBlockingInteraction =
-
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getDefaultHandle());
+ WSRPTypeFactory.createDefaultPerformBlockingInteraction(getDefaultHandle());
InteractionParams interactionParams =
performBlockingInteraction.getInteractionParams();
NamedString[] formParams = {new NamedString("symbol", "HELP")};
// crappy way but this is a test! ;)
interactionParams.setFormParameters(formParams);
@@ -436,8 +436,8 @@
GetMarkup getMarkup = createMarkupRequestForCurrentlyDeployedPortlet();
MarkupResponse response = markupService.getMarkup(getMarkup);
- checkMarkupResponse(response,
"wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite\n"
+
-
"wsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewrite");
+ checkMarkupResponse(response,
"wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite\n"
+
+
"wsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewrite");
}
finally
{
@@ -474,7 +474,7 @@
try
{
PerformBlockingInteraction action =
-
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getHandleForCurrentlyDeployedArchive());
+
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getHandleForCurrentlyDeployedArchive());
action.getInteractionParams().setFormParameters(new NamedString[]{new
NamedString("multi", "value1")});
BlockingInteractionResponse actionResponse =
markupService.performBlockingInteraction(action);
GetMarkup markupRequest = createMarkupRequestForCurrentlyDeployedPortlet();
@@ -483,7 +483,7 @@
checkMarkupResponse(response, "multi: value1");
action.getInteractionParams().setFormParameters(new NamedString[]{
- new NamedString("multi", "value1"), new
NamedString("multi", "value2")});
+ new NamedString("multi", "value1"), new
NamedString("multi", "value2")});
actionResponse = markupService.performBlockingInteraction(action);
markupRequest = createMarkupRequestForCurrentlyDeployedPortlet();
markupRequest.getMarkupParams().setNavigationalState(actionResponse.getUpdateResponse().getNavigationalState());
@@ -685,7 +685,7 @@
private String checkPBIAndGetNavigationalState(String symbol) throws Exception
{
PerformBlockingInteraction performBlockingInteraction =
-
WSRPTypeFactory.createDefaultPerformBlockingInteraction(getDefaultHandle());
+ WSRPTypeFactory.createDefaultPerformBlockingInteraction(getDefaultHandle());
InteractionParams interactionParams =
performBlockingInteraction.getInteractionParams();
NamedString[] formParams = {new NamedString("symbol", symbol)};
interactionParams.setFormParameters(formParams);
@@ -722,7 +722,7 @@
ExtendedAssert.assertNotNull(markupContext);
String markupString = markupContext.getMarkupString();
ExtendedAssert.assertString1ContainsString2(markupString, "count = " +
count);
- ExtendedAssert.assertString1ContainsString2(markupString, "<a
href='wsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewrite'>render</a>");
+ ExtendedAssert.assertString1ContainsString2(markupString, "<a
href='wsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewrite'>render</a>");
// checking session
checkSessionForCurrentlyDeployedPortlet(response);