You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2007/04/17 01:13:49 UTC

svn commit: r529439 - /incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/request/target/coding/UrlMountingTest.java

Author: ehillenius
Date: Mon Apr 16 16:13:48 2007
New Revision: 529439

URL: http://svn.apache.org/viewvc?view=rev&rev=529439
Log:
sorted members, added @see tag

Modified:
    incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/request/target/coding/UrlMountingTest.java

Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/request/target/coding/UrlMountingTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/request/target/coding/UrlMountingTest.java?view=diff&rev=529439&r1=529438&r2=529439
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/request/target/coding/UrlMountingTest.java (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/request/target/coding/UrlMountingTest.java Mon Apr 16 16:13:48 2007
@@ -21,6 +21,7 @@
 import junit.framework.TestCase;
 
 import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.protocol.http.WebRequestCycleProcessor;
 import org.apache.wicket.protocol.http.servlet.AbortWithWebErrorCodeException;
 import org.apache.wicket.settings.ISecuritySettings;
 import org.apache.wicket.util.lang.PackageName;
@@ -87,21 +88,6 @@
 	}
 
 	/**
-	 * Test direct access (with wicket parameters) to a mounted page including
-	 * (part of the) mount path.
-	 */
-	public void testDirectAccessToMountedPageWithExtraPath()
-	{
-		tester.setupRequestAndResponse();
-		tester.getServletRequest().setURL(
-				"/foo/bar/?wicket:bookmarkablePage=:" + TestPage.class.getName() + "");
-		tester.processRequestCycle();
-		tester.assertRenderedPage(TestPage.class);
-		
-		// NOTE: currently the resolve logic is to give priority
-	}
-
-	/**
 	 * Test direct access (with wicket parameters) to a mounted page that should
 	 * NOT be allowed due to the {@link ISecuritySettings#getEnforceMounts()}
 	 * setting being set to true.
@@ -126,6 +112,23 @@
 		{
 			tester.getApplication().getSecuritySettings().setEnforceMounts(false);
 		}
+	}
+
+	/**
+	 * Test direct access (with wicket parameters) to a mounted page including
+	 * (part of the) mount path.
+	 * 
+	 * @see WebRequestCycleProcessor#resolve(org.apache.wicket.RequestCycle,
+	 *      org.apache.wicket.request.RequestParameters) for an explanation of
+	 *      this test
+	 */
+	public void testDirectAccessToMountedPageWithExtraPath()
+	{
+		tester.setupRequestAndResponse();
+		tester.getServletRequest().setURL(
+				"/foo/bar/?wicket:bookmarkablePage=:" + TestPage.class.getName() + "");
+		tester.processRequestCycle();
+		tester.assertRenderedPage(TestPage.class);
 	}
 
 	/**