You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2006/11/06 14:33:26 UTC

svn commit: r471726 [4/4] - in /incubator/wicket/trunk/wicket/src: main/java/wicket/protocol/http/ main/java/wicket/util/diff/ main/java/wicket/util/tester/ test/java/wicket/ test/java/wicket/ajax/ test/java/wicket/ajax/markup/html/ajaxLink/ test/java/...

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableNavigatorWithMarginExpectedResult_7.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableNavigatorWithMarginExpectedResult_7.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableNavigatorWithMarginExpectedResult_7.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableNavigatorWithMarginExpectedResult_7.html Mon Nov  6 05:33:20 2006
@@ -18,19 +18,19 @@
 </head>
 <body><ul><li wicket:id="table"><span wicket:id="txt">five</span></li><li wicket:id="table"><span wicket:id="txt">six</span></li></ul>
 <span wicket:id="navigator"><wicket:panel>
-	<a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:navigator:first::ILinkListener" wicket:id="first">&lt;&lt;</a>&nbsp;<a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:navigator:prev::ILinkListener" wicket:id="prev">&lt;</a>
+	<a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:navigator:first::ILinkListener" wicket:id="first">&lt;&lt;</a>&nbsp;<a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:navigator:prev::ILinkListener" wicket:id="prev">&lt;</a>
     <span wicket:id="navigation">
-		  <a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:navigator:navigation:0:pageLink::ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">1</span></a>
+		  <a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:navigator:navigation:0:pageLink::ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">1</span></a>
     </span>, <span wicket:id="navigation">
-		  <a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:navigator:navigation:1:pageLink::ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">2</span></a>
+		  <a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:navigator:navigation:1:pageLink::ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">2</span></a>
     </span>, <span wicket:id="navigation">
 		  <span wicket:id="pageLink"><em><span wicket:id="pageNumber">3</span></em></span>
     </span>, <span wicket:id="navigation">
-		  <a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:navigator:navigation:3:pageLink::ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">4</span></a>
+		  <a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:navigator:navigation:3:pageLink::ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">4</span></a>
     </span>, <span wicket:id="navigation">
-		  <a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:navigator:navigation:4:pageLink::ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">5</span></a>
+		  <a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:navigator:navigation:4:pageLink::ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">5</span></a>
     </span>
-    <a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:navigator:next::ILinkListener" wicket:id="next">&gt;</a>&nbsp;<a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:navigator:last::ILinkListener" wicket:id="last">&gt;&gt;</a>
+    <a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:navigator:next::ILinkListener" wicket:id="next">&gt;</a>&nbsp;<a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:navigator:last::ILinkListener" wicket:id="last">&gt;&gt;</a>
   </wicket:panel></span>
 </body>
 </html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableNavigatorWithMarginTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableNavigatorWithMarginTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableNavigatorWithMarginTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableNavigatorWithMarginTest.java Mon Nov  6 05:33:20 2006
@@ -22,8 +22,8 @@
 
 import junit.framework.TestCase;
 import wicket.markup.html.link.Link;
-import wicket.protocol.http.MockWebApplication;
 import wicket.util.diff.DiffUtil;
+import wicket.util.tester.WicketTester;
 
 
 /**
@@ -57,13 +57,12 @@
 	 */
 	public void testPagedTable() throws Exception
 	{
-		MockWebApplication application = new MockWebApplication(null);
-		application.setHomePage(PagedTableNavigatorWithMarginPage.class);
-		application.setupRequestAndResponse();
-		application.processRequestCycle();
-		PagedTableNavigatorWithMarginPage page = (PagedTableNavigatorWithMarginPage)application
+		WicketTester tester = new WicketTester(PagedTableNavigatorWithMarginPage.class);
+		tester.setupRequestAndResponse();
+		tester.processRequestCycle();
+		PagedTableNavigatorWithMarginPage page = (PagedTableNavigatorWithMarginPage)tester
 				.getLastRenderedPage();
-		String document = application.getServletResponse().getDocument();
+		String document = tester.getServletResponse().getDocument();
 		assertTrue(validatePage(document, "PagedTableNavigatorWithMarginExpectedResult_1.html"));
 
 		Link link = (Link)page.get("navigator:first");
@@ -79,10 +78,10 @@
 		assertTrue(link.isEnabled());
 
 		link = (Link)page.get("navigator:next");
-		application.setupRequestAndResponse();
-		application.getServletRequest().setRequestToComponent(link);
-		application.processRequestCycle();
-		document = application.getServletResponse().getDocument();
+		tester.setupRequestAndResponse();
+		tester.getServletRequest().setRequestToComponent(link);
+		tester.processRequestCycle();
+		document = tester.getServletResponse().getDocument();
 		assertTrue(validatePage(document, "PagedTableNavigatorWithMarginExpectedResult_2.html"));
 
 		link = (Link)page.get("navigator:first");
@@ -98,10 +97,10 @@
 		assertTrue(link.isEnabled());
 
 		link = (Link)page.get("navigator:prev");
-		application.setupRequestAndResponse();
-		application.getServletRequest().setRequestToComponent(link);
-		application.processRequestCycle();
-		document = application.getServletResponse().getDocument();
+		tester.setupRequestAndResponse();
+		tester.getServletRequest().setRequestToComponent(link);
+		tester.processRequestCycle();
+		document = tester.getServletResponse().getDocument();
 		assertTrue(validatePage(document, "PagedTableNavigatorWithMarginExpectedResult_3.html"));
 
 		link = (Link)page.get("navigator:first");
@@ -117,10 +116,10 @@
 		assertTrue(link.isEnabled());
 
 		link = (Link)page.get("navigator:last");
-		application.setupRequestAndResponse();
-		application.getServletRequest().setRequestToComponent(link);
-		application.processRequestCycle();
-		document = application.getServletResponse().getDocument();
+		tester.setupRequestAndResponse();
+		tester.getServletRequest().setRequestToComponent(link);
+		tester.processRequestCycle();
+		document = tester.getServletResponse().getDocument();
 		assertTrue(validatePage(document, "PagedTableNavigatorWithMarginExpectedResult_4.html"));
 
 		link = (Link)page.get("navigator:first");
@@ -136,10 +135,10 @@
 		assertFalse(link.isEnabled());
 
 		link = (Link)page.get("navigator:first");
-		application.setupRequestAndResponse();
-		application.getServletRequest().setRequestToComponent(link);
-		application.processRequestCycle();
-		document = application.getServletResponse().getDocument();
+		tester.setupRequestAndResponse();
+		tester.getServletRequest().setRequestToComponent(link);
+		tester.processRequestCycle();
+		document = tester.getServletResponse().getDocument();
 		assertTrue(validatePage(document, "PagedTableNavigatorWithMarginExpectedResult_5.html"));
 
 		link = (Link)page.get("navigator:first");
@@ -155,10 +154,10 @@
 		assertTrue(link.isEnabled());
 
 		link = (Link)page.get("navigator:navigation:3:pageLink");
-		application.setupRequestAndResponse();
-		application.getServletRequest().setRequestToComponent(link);
-		application.processRequestCycle();
-		document = application.getServletResponse().getDocument();
+		tester.setupRequestAndResponse();
+		tester.getServletRequest().setRequestToComponent(link);
+		tester.processRequestCycle();
+		document = tester.getServletResponse().getDocument();
 		assertTrue(validatePage(document, "PagedTableNavigatorWithMarginExpectedResult_6.html"));
 
 		link = (Link)page.get("navigator:first");
@@ -174,10 +173,10 @@
 		assertTrue(link.isEnabled());
 
 		link = (Link)page.get("navigator:prev");
-		application.setupRequestAndResponse();
-		application.getServletRequest().setRequestToComponent(link);
-		application.processRequestCycle();
-		document = application.getServletResponse().getDocument();
+		tester.setupRequestAndResponse();
+		tester.getServletRequest().setRequestToComponent(link);
+		tester.processRequestCycle();
+		document = tester.getServletResponse().getDocument();
 		assertTrue(validatePage(document, "PagedTableNavigatorWithMarginExpectedResult_7.html"));
 
 		link = (Link)page.get("navigator:first");

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTablePageExpectedResult.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTablePageExpectedResult.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTablePageExpectedResult.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTablePageExpectedResult.html Mon Nov  6 05:33:20 2006
@@ -17,6 +17,6 @@
 <title>Paged Table Page</title>
 </head>
 <body><ul><li wicket:id="table"><span wicket:id="txt">three</span></li></ul>
-<ul><li wicket:id="navigation"><a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:navigation:0:pageLink:1:ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">1</span></a></li><li wicket:id="navigation"><span wicket:id="pageLink"><em><span wicket:id="pageNumber">2</span></em></span></li></ul>
+<ul><li wicket:id="navigation"><a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:navigation:0:pageLink:1:ILinkListener" wicket:id="pageLink"><span wicket:id="pageNumber">1</span></a></li><li wicket:id="navigation"><span wicket:id="pageLink"><em><span wicket:id="pageNumber">2</span></em></span></li></ul>
 </body>
 </html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/PagedTableTest.java Mon Nov  6 05:33:20 2006
@@ -20,11 +20,11 @@
 
 import junit.framework.TestCase;
 import wicket.markup.html.link.Link;
-import wicket.protocol.http.MockWebApplication;
 import wicket.protocol.http.documentvalidation.HtmlDocumentValidator;
 import wicket.protocol.http.documentvalidation.Tag;
 import wicket.protocol.http.documentvalidation.TextContent;
 import wicket.util.diff.DiffUtil;
+import wicket.util.tester.WicketTester;
 
 
 /**
@@ -59,19 +59,18 @@
 	 */
 	public void testPagedTable() throws Exception
 	{
-		MockWebApplication application = new MockWebApplication(null);
-		application.setHomePage(PagedTablePage.class);
-		application.setupRequestAndResponse();
-		application.processRequestCycle();
-		PagedTablePage page = (PagedTablePage)application.getLastRenderedPage();
-		String document = application.getServletResponse().getDocument();
+		WicketTester tester = new WicketTester(PagedTablePage.class);
+		tester.setupRequestAndResponse();
+		tester.processRequestCycle();
+		PagedTablePage page = (PagedTablePage)tester.getLastRenderedPage();
+		String document = tester.getServletResponse().getDocument();
 		assertTrue(validatePage1(document));
 
 		Link link = (Link)page.get("navigation:1:pageLink");
-		application.setupRequestAndResponse();
-		application.getServletRequest().setRequestToComponent(link);
-		application.processRequestCycle();
-		document = application.getServletResponse().getDocument();
+		tester.setupRequestAndResponse();
+		tester.getServletRequest().setRequestToComponent(link);
+		tester.processRequestCycle();
+		document = tester.getServletResponse().getDocument();
 		assertTrue(DiffUtil.validatePage(document, this.getClass(),
 				"PagedTablePageExpectedResult.html"));
 	}

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/SimpleTableTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/SimpleTableTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/SimpleTableTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/SimpleTableTest.java Mon Nov  6 05:33:20 2006
@@ -47,10 +47,10 @@
 		executeTest(SimpleTablePage_1.class, "SimpleTablePageExpectedResult_1.html");
 
 		// Does re-render do as well ??
-		ListView view = (ListView)application.getLastRenderedPage().get("table");
+		ListView view = (ListView)tester.getLastRenderedPage().get("table");
 		assertNotNull(view);
-		application.processRequestCycle(view);
-		String document = application.getServletResponse().getDocument();
+		tester.processRequestCycle(view);
+		String document = tester.getServletResponse().getDocument();
 		assertNotNull(document);
 		assertFalse("".equals(document));
 		assertEquals(
@@ -58,19 +58,19 @@
 				document);
 
 		// Does re-render do as well ??
-		ListItem item = (ListItem)application.getLastRenderedPage().get("table:0");
+		ListItem item = (ListItem)tester.getLastRenderedPage().get("table:0");
 		assertNotNull(item);
-		application.processRequestCycle(item);
-		document = application.getServletResponse().getDocument();
+		tester.processRequestCycle(item);
+		document = tester.getServletResponse().getDocument();
 		assertNotNull(document);
 		assertFalse("".equals(document));
 		assertEquals("<li wicket:id=\"table\"><span wicket:id=\"txt\">one</span></li>", document);
 
 		// Does re-render do as well ??
-		Label label = (Label)application.getLastRenderedPage().get("table:1:txt");
+		Label label = (Label)tester.getLastRenderedPage().get("table:1:txt");
 		assertNotNull(label);
-		application.processRequestCycle(label);
-		document = application.getServletResponse().getDocument();
+		tester.processRequestCycle(label);
+		document = tester.getServletResponse().getDocument();
 		assertNotNull(document);
 		assertFalse("".equals(document));
 		assertEquals("<span wicket:id=\"txt\">two</span>", document);
@@ -86,10 +86,10 @@
 		executeTest(SimpleTablePage_2.class, "SimpleTablePageExpectedResult_2.html");
 
 		// Does re-render do as well ??
-		ListView view = (ListView)application.getLastRenderedPage().get("table");
+		ListView view = (ListView)tester.getLastRenderedPage().get("table");
 		assertNotNull(view);
-		application.processRequestCycle(view);
-		String document = application.getServletResponse().getDocument();
+		tester.processRequestCycle(view);
+		String document = tester.getServletResponse().getDocument();
 		assertNotNull(document);
 		assertFalse("".equals(document));
 		assertEquals(
@@ -97,10 +97,10 @@
 				document);
 
 		// Does re-render do as well ??
-		view = (ListView)application.getLastRenderedPage().get("table");
+		view = (ListView)tester.getLastRenderedPage().get("table");
 		assertNotNull(view);
-		application.processRequestCycle(view);
-		document = application.getServletResponse().getDocument();
+		tester.processRequestCycle(view);
+		document = tester.getServletResponse().getDocument();
 		assertNotNull(document);
 		assertFalse("".equals(document));
 		assertEquals(

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/panel/InlinePanelPageExpectedResult_6.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/panel/InlinePanelPageExpectedResult_6.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/panel/InlinePanelPageExpectedResult_6.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/panel/InlinePanelPageExpectedResult_6.html Mon Nov  6 05:33:20 2006
@@ -1,7 +1,7 @@
-<html xmlns:wicket>
-<body>
-  <span wicket:id="myPanel1">
-	<a href="/WicketTester/WicketTester?wicket:interface=:0:myPanel1:link::ILinkListener" wicket:id="link"><span wicket:id="label1">my label text</span></a>
-  </span>
-</body>
-</html>
+<html xmlns:wicket>
+<body>
+  <span wicket:id="myPanel1">
+	<a href="/DummyApplication/DummyApplication?wicket:interface=:0:myPanel1:link::ILinkListener" wicket:id="link"><span wicket:id="label1">my label text</span></a>
+  </span>
+</body>
+</html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/panel/PanelTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/panel/PanelTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/panel/PanelTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/panel/PanelTest.java Mon Nov  6 05:33:20 2006
@@ -22,7 +22,7 @@
 import wicket.markup.MarkupException;
 
 /**
- * Simple application that demonstrates the mock http application code (and
+ * Simple tester that demonstrates the mock http tester code (and
  * checks that it is working)
  * 
  * @author Chris Turner

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/tags/InputTagNotVisibleWebPageResult.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/tags/InputTagNotVisibleWebPageResult.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/tags/InputTagNotVisibleWebPageResult.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/tags/InputTagNotVisibleWebPageResult.html Mon Nov  6 05:33:20 2006
@@ -1,6 +1,6 @@
 <html>
 <body>
-<form action="/WicketTester/WicketTester?wicket:interface=:0:form::IFormSubmitListener" id="form" method="post" wicket:id="form">
+<form action="/DummyApplication/DummyApplication?wicket:interface=:0:form::IFormSubmitListener" id="form" method="post" wicket:id="form">
 <div style="display:none"><input type="hidden" name="form:hf:fs" id="form:hf:fs"/>
 <input type="hidden" name="wicketState" id="form:hf:ws"/></div>
 

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/tags/InputTagVisibleWebPageResult.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/tags/InputTagVisibleWebPageResult.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/tags/InputTagVisibleWebPageResult.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/tags/InputTagVisibleWebPageResult.html Mon Nov  6 05:33:20 2006
@@ -1,6 +1,6 @@
 <html>
 <body>
-<form action="/WicketTester/WicketTester?wicket:interface=:0:form::IFormSubmitListener" id="form" method="post" wicket:id="form">
+<form action="/DummyApplication/DummyApplication?wicket:interface=:0:form::IFormSubmitListener" id="form" method="post" wicket:id="form">
 <div style="display:none"><input type="hidden" name="form:hf:fs" id="form:hf:fs"/>
 <input type="hidden" name="wicketState" id="form:hf:ws"/></div>
 <input value="" type="text" name="input" wicket:id="input">

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/PageExpectedResult_1.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/PageExpectedResult_1.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/PageExpectedResult_1.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/PageExpectedResult_1.html Mon Nov  6 05:33:20 2006
@@ -1,6 +1,6 @@
 <html xmlns:wicket>
 <body>
-  <a href="/WicketTester/myImage.gif">mein Label</a>
+  <a href="/DummyApplication/myImage.gif">mein Label</a>
   <a href="/myImage.gif">mein Label</a>
 </body>
 </html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/PrependContextPathHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/PrependContextPathHandlerTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/PrependContextPathHandlerTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/PrependContextPathHandlerTest.java Mon Nov  6 05:33:20 2006
@@ -59,7 +59,7 @@
 	 */
 	public final void testWithRootContext() throws Exception
 	{
-		application.getApplicationSettings().setContextPath("");
+		tester.getApplication().getApplicationSettings().setContextPath("");
 		executeTest(Page_1.class, "PageExpectedResult_rootcontext.html");
 	}
 
@@ -68,7 +68,7 @@
 	 */
 	public final void testWithOtherContext() throws Exception
 	{
-		application.getApplicationSettings().setContextPath("/other");
+		tester.getApplication().getApplicationSettings().setContextPath("/other");
 		executeTest(Page_1.class, "PageExpectedResult_othercontext.html");
 	}
 
@@ -77,8 +77,7 @@
 	 */
 	public final void testAnchors() throws Exception
 	{
-		application.getApplicationSettings().setContextPath("/other");
+		tester.getApplication().getApplicationSettings().setContextPath("/other");
 		executeTest(Page_2.class, "Page2ExpectedResult.html");
 	}
-
 }

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/DoubleHeaderPartPageExpectedResult.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/DoubleHeaderPartPageExpectedResult.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/DoubleHeaderPartPageExpectedResult.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/DoubleHeaderPartPageExpectedResult.html Mon Nov  6 05:33:20 2006
@@ -2,8 +2,8 @@
     <head>
         <title wicket:id="title">Header Part Test</title>
 	
-		<script src="/WicketTester/WicketTester/resources/wicket.markup.parser.filter.PanelWithHeaderPart/test.js" type="text/javascript" wicket:id="testscript"></script>
-		<link href="/WicketTester/WicketTester/resources/wicket.markup.parser.filter.PanelWithHeaderPart/test.css" rel="stylesheet" type="text/css" wicket:id="testlink"/>
+		<script src="/DummyApplication/DummyApplication/resources/wicket.markup.parser.filter.PanelWithHeaderPart/test.js" type="text/javascript" wicket:id="testscript"></script>
+		<link href="/DummyApplication/DummyApplication/resources/wicket.markup.parser.filter.PanelWithHeaderPart/test.css" rel="stylesheet" type="text/css" wicket:id="testlink"/>
 	</head>
     <body>
    	 <span wicket:id="panelwithheadercomponents1"><wicket:panel>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_12.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_12.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_12.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_12.html Mon Nov  6 05:33:20 2006
@@ -1,7 +1,7 @@
 <html xmlns:wicket="http://wicket.sourceforge.net/">
 <head>
   <wicket:link autolink="true">
-    <link href="/WicketTester/WicketTester/resources/wicket.markup.parser.filter.sub.HeaderSectionBorder/cborder.css" type="text/css" rel="StyleSheet"/>
+    <link href="/DummyApplication/DummyApplication/resources/wicket.markup.parser.filter.sub.HeaderSectionBorder/cborder.css" type="text/css" rel="StyleSheet"/>
   </wicket:link>
 </head><body>
   <span wicket:id="border"><wicket:border>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_14.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_14.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_14.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_14.html Mon Nov  6 05:33:20 2006
@@ -1,10 +1,10 @@
 <html xmlns:wicket>
 
 <head>
-  <link href="/WicketTester/feedback.css" type="text/css" rel="stylesheet"/>
+  <link href="/DummyApplication/feedback.css" type="text/css" rel="stylesheet"/>
 
   <meta http-equiv="content-type" content="text/html;charset=UTF-8"></meta>
-  <link href="/WicketTester/style.css" type="text/css" rel="stylesheet"></link>
+  <link href="/DummyApplication/style.css" type="text/css" rel="stylesheet"></link>
 </head><body>
   <h3> Do a view source on this page and you should see a double &lt;head&gt;</h3>
   <div wicket:id="border"><wicket:border>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_9.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_9.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_9.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_9.html Mon Nov  6 05:33:20 2006
@@ -18,7 +18,7 @@
   panel header 
   <link media="print,type" href="myStyle.css" type="css" wicket:id="cssHref"/>
   <wicket:link autolink="true">
-    <link href="/WicketTester/WicketTester/resources/wicket.markup.parser.filter.HeaderSectionPanel_2/style.css" rel="StyleSheet" type="text/css"/>
+    <link href="/DummyApplication/DummyApplication/resources/wicket.markup.parser.filter.HeaderSectionPanel_2/style.css" rel="StyleSheet" type="text/css"/>
   </wicket:link>
 </head><body>
   <span wicket:id="panel"><wicket:panel>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_9a.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_9a.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_9a.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionPageExpectedResult_9a.html Mon Nov  6 05:33:20 2006
@@ -18,7 +18,7 @@
   panel header 
   
   <wicket:link autolink="true">
-    <link href="/WicketTester/WicketTester/resources/wicket.markup.parser.filter.HeaderSectionPanel_2/style.css" rel="StyleSheet" type="text/css"/>
+    <link href="/DummyApplication/DummyApplication/resources/wicket.markup.parser.filter.HeaderSectionPanel_2/style.css" rel="StyleSheet" type="text/css"/>
   </wicket:link>
 </head><body>
   <span wicket:id="panel"><wicket:panel>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/markup/parser/filter/HeaderSectionTest.java Mon Nov  6 05:33:20 2006
@@ -24,7 +24,7 @@
 import wicket.util.resource.IResourceStream;
 
 /**
- * Simple application that demonstrates the mock http application code (and
+ * Simple tester that demonstrates the mock http tester code (and
  * checks that it is working)
  * 
  * @author Chris Turner
@@ -144,7 +144,7 @@
 	public void testRenderHomePage_12() throws Exception
 	{
 		executeTest(HeaderSectionPage_12.class, "HeaderSectionPageExpectedResult_12.html");
-		PackageResource res = (PackageResource)application.getSharedResources().get(
+		PackageResource res = (PackageResource)tester.getApplication().getSharedResources().get(
 				"wicket.markup.parser.filter.sub.HeaderSectionBorder/cborder.css");
 		assertNotNull(res);
 		String absPath = res.getAbsolutePath();

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/model/StringResourceModelTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/model/StringResourceModelTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/model/StringResourceModelTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/model/StringResourceModelTest.java Mon Nov  6 05:33:20 2006
@@ -26,9 +26,9 @@
 import junit.framework.TestCase;
 import wicket.markup.html.WebPage;
 import wicket.protocol.http.MockPage;
-import wicket.protocol.http.MockWebApplication;
 import wicket.protocol.http.WebRequestCycle;
 import wicket.resource.loader.BundleStringResourceLoader;
+import wicket.util.tester.WicketTester;
 
 /**
  * Test cases for the <code>StringResourceModel</code> class.
@@ -37,8 +37,7 @@
  */
 public class StringResourceModelTest extends TestCase
 {
-
-	private MockWebApplication application;
+	private WicketTester tester;
 
 	private WebPage page;
 
@@ -61,8 +60,8 @@
 	protected void setUp() throws Exception
 	{
 		super.setUp();
-		application = new MockWebApplication(null);
-		application.getResourceSettings().addStringResourceLoader(
+		tester = new WicketTester();
+		tester.getApplication().getResourceSettings().addStringResourceLoader(
 				new BundleStringResourceLoader("wicket.model.StringResourceModelTest"));
 		page = new MockPage();
 		ws = new WeatherStation();
@@ -71,7 +70,6 @@
 
 	/**
 	 * 
-	 * 
 	 */
 	public void testGetSimpleResource()
 	{
@@ -83,7 +81,6 @@
 
 	/**
 	 * 
-	 * 
 	 */
 	public void testNullResourceKey()
 	{
@@ -100,7 +97,6 @@
 
 	/**
 	 * 
-	 * 
 	 */
 	public void testGetSimpleResourceWithKeySubstitution()
 	{
@@ -115,7 +111,6 @@
 
 	/**
 	 * 
-	 * 
 	 */
 	public void testGetPropertySubstitutedResource()
 	{
@@ -129,7 +124,6 @@
 
 	/**
 	 * 
-	 * 
 	 */
 	public void testSubstitutionParametersResource()
 	{
@@ -154,7 +148,6 @@
 
 	/**
 	 * 
-	 * 
 	 */
 	public void testUninitialisedLocalizer()
 	{
@@ -197,8 +190,8 @@
 	public void testDetachAttachNormalModel() throws Exception
 	{
 		StringResourceModel model = new StringResourceModel("simple.text", page, wsModel);
-		application.setupRequestAndResponse();
-		new WebRequestCycle(application.getWicketSession(), application.getWicketRequest(), application.getWicketResponse());
+		tester.setupRequestAndResponse();
+		new WebRequestCycle(tester.getWicketSession(), tester.getWicketRequest(), tester.getWicketResponse());
 		model.attach();
 		Assert.assertNotNull(model.getLocalizer());
 		model.detach();
@@ -236,8 +229,8 @@
 
 		};
 		StringResourceModel model = new StringResourceModel("simple.text", page, wsDetachModel);
-		application.setupRequestAndResponse();
-		new WebRequestCycle(application.getWicketSession(), application.getWicketRequest(), application.getWicketResponse());
+		tester.setupRequestAndResponse();
+		new WebRequestCycle(tester.getWicketSession(), tester.getWicketRequest(), tester.getWicketResponse());
 		model.attach();
 		Assert.assertNotNull(model.getLocalizer());
 		model.detach();
@@ -253,7 +246,6 @@
 	{
 		private static final long serialVersionUID = 1L;
 
-
 		private String currentStatus = "sunny";
 
 		private double currentTemperature = 25.7;
@@ -298,5 +290,4 @@
 			return "\u00B0C";
 		}
 	}
-
 }

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/performance/MarkupParserPerformanceTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/performance/MarkupParserPerformanceTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/performance/MarkupParserPerformanceTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/performance/MarkupParserPerformanceTest.java Mon Nov  6 05:33:20 2006
@@ -38,6 +38,8 @@
 import wicket.markup.parser.filter.EnclosureHandler;
 import wicket.markup.parser.filter.WicketTagIdentifier;
 import wicket.markup.resolver.EnclosureResolver;
+import wicket.protocol.http.WebApplication;
+import wicket.resource.DummyApplication;
 import wicket.util.file.Folder;
 import wicket.util.io.Streams;
 import wicket.util.resource.StringResourceStream;
@@ -67,8 +69,7 @@
 	/** List of all MarkupResourceStream; in the very same order as 'files' */
 	private List<MarkupResourceStream> resources;
 
-	/** Wicket application object */
-	private WicketTester application = new WicketTester(null)
+	private WebApplication application = new DummyApplication() 
 	{
 		@Override
 		protected void init()
@@ -77,6 +78,9 @@
 			getPageSettings().addComponentResolver(new EnclosureResolver());
 		}
 	};
+
+	/** Wicket tester object */
+	private WicketTester tester = new WicketTester(this.application);
 
 	/** Time to execute a single test */
 	private double duration[];

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/properties/MyApplication.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/properties/MyApplication.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/properties/MyApplication.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/properties/MyApplication.java Mon Nov  6 05:33:20 2006
@@ -17,13 +17,15 @@
  */
 package wicket.properties;
 
-import wicket.util.tester.WicketTester;
+import wicket.Page;
+import wicket.protocol.http.WebApplication;
+import wicket.resource.DummyPage;
 
 /**
  * 
  * @author Juergen Donnerstag
  */
-public class MyApplication extends WicketTester
+public class MyApplication extends WebApplication
 {
 	private static final long serialVersionUID = 1L;
 
@@ -32,5 +34,11 @@
 	 */
 	public MyApplication()
 	{
+	}
+	
+	@Override
+	public Class<? extends Page> getHomePage()
+	{
+		return DummyPage.class;
 	}
 }

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/properties/MyTesterApplication.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/properties/MyTesterApplication.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/properties/MyTesterApplication.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/properties/MyTesterApplication.java Mon Nov  6 05:33:20 2006
@@ -18,13 +18,15 @@
  */
 package wicket.properties;
 
-import wicket.util.tester.WicketTester;
+import wicket.Page;
+import wicket.protocol.http.WebApplication;
+import wicket.resource.DummyPage;
 
 /**
  * 
  * @author Juergen Donnerstag
  */
-public class MyTesterApplication extends WicketTester
+public class MyTesterApplication extends WebApplication
 {
 	private static final long serialVersionUID = 1L;
 
@@ -33,5 +35,11 @@
 	 */
 	public MyTesterApplication()
 	{
+	}
+
+	@Override
+	public Class<? extends Page> getHomePage()
+	{
+		return DummyPage.class;
 	}
 }

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/properties/PropertiesTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/properties/PropertiesTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/properties/PropertiesTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/properties/PropertiesTest.java Mon Nov  6 05:33:20 2006
@@ -22,6 +22,7 @@
 import wicket.WicketTestCase;
 import wicket.protocol.http.WebRequestCycle;
 import wicket.resource.loader.WicketBundleStringResourceLoader;
+import wicket.util.tester.WicketTester;
 
 /**
  * 
@@ -42,7 +43,7 @@
 	@Override
 	protected void setUp() throws Exception
 	{
-		application = new MyApplication();
+		tester = new WicketTester(new MyApplication());
 	}
 
 	/**
@@ -53,11 +54,11 @@
 	{
 		// Add the string resource loader with the special Bundle like
 		// behavior
-		application.getResourceSettings().addStringResourceLoader(
-				new WicketBundleStringResourceLoader(application));
+		tester.getApplication().getResourceSettings().addStringResourceLoader(
+				new WicketBundleStringResourceLoader(tester.getApplication()));
 
-		application.setupRequestAndResponse();
-		WebRequestCycle cycle = application.createRequestCycle();
+		tester.setupRequestAndResponse();
+		WebRequestCycle cycle = tester.createRequestCycle();
 		TestPage page = new TestPage();
 		cycle.getSession().setLocale(Locale.GERMANY);
 		cycle.getSession().setStyle("mystyle");
@@ -76,11 +77,11 @@
 	{
 		// Add the string resource loader with the special Bundle like
 		// behavior
-		application.getResourceSettings().addStringResourceLoader(
-				new WicketBundleStringResourceLoader(application));
+		tester.getApplication().getResourceSettings().addStringResourceLoader(
+				new WicketBundleStringResourceLoader(tester.getApplication()));
 
-		application.setupRequestAndResponse();
-		WebRequestCycle cycle = application.createRequestCycle();
+		tester.setupRequestAndResponse();
+		WebRequestCycle cycle = tester.createRequestCycle();
 		cycle.getSession().setLocale(Locale.GERMANY);
 		TestPage page = new TestPage()
 		{

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockPage_expectedResult.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockPage_expectedResult.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockPage_expectedResult.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockPage_expectedResult.html Mon Nov  6 05:33:20 2006
@@ -16,6 +16,6 @@
 <title>Mock Page</title>
 </head>
 <body>
-<a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:actionLink::ILinkListener" wicket:id="actionLink">Action link clicked <span wicket:id="linkClickCount">0</span> times</a>
+<a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:actionLink::ILinkListener" wicket:id="actionLink">Action link clicked <span wicket:id="linkClickCount">0</span> times</a>
 </body>
 </html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockPage_expectedResult2.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockPage_expectedResult2.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockPage_expectedResult2.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockPage_expectedResult2.html Mon Nov  6 05:33:20 2006
@@ -16,6 +16,6 @@
 <title>Mock Page</title>
 </head>
 <body>
-<a href="/MockWebApplication/MockWebApplication?wicket:interface=:0:actionLink::ILinkListener" wicket:id="actionLink">Action link clicked <span wicket:id="linkClickCount">1</span> times</a>
+<a href="/WicketTester$1/WicketTester$1?wicket:interface=:0:actionLink::ILinkListener" wicket:id="actionLink">Action link clicked <span wicket:id="linkClickCount">1</span> times</a>
 </body>
 </html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockWebApplicationTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockWebApplicationTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockWebApplicationTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/MockWebApplicationTest.java Mon Nov  6 05:33:20 2006
@@ -19,23 +19,24 @@
 package wicket.protocol.http;
 
 import java.util.Iterator;
+
 import junit.framework.Assert;
 import junit.framework.TestCase;
-import wicket.markup.html.link.Link;
-import wicket.util.diff.DiffUtil;
 import wicket.Session;
 import wicket.feedback.FeedbackMessage;
+import wicket.markup.html.link.Link;
+import wicket.util.diff.DiffUtil;
+import wicket.util.tester.WicketTester;
 
 /**
- * Simple application that demonstrates the mock http application code (and
+ * Simple tester that demonstrates the mock http tester code (and
  * checks that it is working)
  * 
  * @author Chris Turner
  */
 public class MockWebApplicationTest extends TestCase
 {
-
-	private MockWebApplication application;
+	private WicketTester tester;
 
 	/**
 	 * Create the test.
@@ -52,8 +53,7 @@
 	protected void setUp() throws Exception
 	{
 		super.setUp();
-		application = new MockWebApplication(null);
-		application.setHomePage(MockPage.class);
+		tester = new WicketTester(MockPage.class);
 	}
 
 	/**
@@ -62,15 +62,15 @@
 	public void testRenderHomePage() throws Exception
 	{
 		// Do the processing
-		application.setupRequestAndResponse();
-		application.processRequestCycle();
+		tester.setupRequestAndResponse();
+		tester.processRequestCycle();
 
 		// Validate the document
-		String document = application.getServletResponse().getDocument();
+		String document = tester.getServletResponse().getDocument();
 		assertTrue(DiffUtil.validatePage(document, this.getClass(), "MockPage_expectedResult.html"));
 
 		// Inspect the page & model
-		MockPage p = (MockPage)application.getLastRenderedPage();
+		MockPage p = (MockPage)tester.getLastRenderedPage();
 		Assert.assertEquals("Link should have been clicked 0 times", 0, p.getLinkClickCount());
 	}
 
@@ -79,8 +79,8 @@
 	 */
 	public void testSessionFeedbackMessagesCleanUp() 
 	{
-		application.setupRequestAndResponse();
-		application.processRequestCycle();
+		tester.setupRequestAndResponse();
+		tester.processRequestCycle();
 		Session session = Session.get();
 		session.info("Message");
 		session.info("Not rendered");
@@ -104,28 +104,28 @@
 		testRenderHomePage();
 
 		// Now request that we click the link
-		application.setupRequestAndResponse();
-		MockPage p = (MockPage)application.getLastRenderedPage();
+		tester.setupRequestAndResponse();
+		MockPage p = (MockPage)tester.getLastRenderedPage();
 		Link link = (Link)p.get("actionLink");
-		application.getServletRequest().setRequestToComponent(link);
-		application.processRequestCycle();
+		tester.getServletRequest().setRequestToComponent(link);
+		tester.processRequestCycle();
 
 		// Check that redirect was set as expected and invoke it
 		/*
 		 * Assert.assertTrue("Response should be a redirect",
-		 * application.getServletResponse().isRedirect()); String redirect =
-		 * application.getServletResponse().getRedirectLocation();
-		 * application.setupRequestAndResponse();
-		 * application.getServletRequest().setRequestToRedirectString(redirect);
-		 * application.processRequestCycle();
+		 * tester.getServletResponse().isRedirect()); String redirect =
+		 * tester.getServletResponse().getRedirectLocation();
+		 * tester.setupRequestAndResponse();
+		 * tester.getServletRequest().setRequestToRedirectString(redirect);
+		 * tester.processRequestCycle();
 		 */
 		// Validate the document
-		String document = application.getServletResponse().getDocument();
+		String document = tester.getServletResponse().getDocument();
 		assertTrue(DiffUtil
 				.validatePage(document, this.getClass(), "MockPage_expectedResult2.html"));
 
 		// Inspect the page & model
-		p = (MockPage)application.getLastRenderedPage();
+		p = (MockPage)tester.getLastRenderedPage();
 		Assert.assertEquals("Link should have been clicked 1 time", 1, p.getLinkClickCount());
 	}
 }

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/WebRequestTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/WebRequestTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/WebRequestTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/WebRequestTest.java Mon Nov  6 05:33:20 2006
@@ -19,6 +19,7 @@
 package wicket.protocol.http;
 
 import wicket.protocol.http.servlet.ServletWebRequest;
+import wicket.util.tester.WicketTester;
 import junit.framework.TestCase;
 
 /**
@@ -65,7 +66,7 @@
 
 	private void assertWithHeader(String header, String value, boolean isAjax)
 	{
-		MockHttpServletRequest mockRequest = new MockWebApplication(null).getServletRequest();
+		MockHttpServletRequest mockRequest = new WicketTester().getServletRequest();
 		mockRequest.addHeader(header, value);
 
 		WebRequest webRequest = new ServletWebRequest(mockRequest);

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/WicketTagPanelTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/WicketTagPanelTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/WicketTagPanelTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/WicketTagPanelTest.java Mon Nov  6 05:33:20 2006
@@ -26,10 +26,11 @@
 import wicket.protocol.http.documentvalidation.HtmlDocumentValidator;
 import wicket.protocol.http.documentvalidation.Tag;
 import wicket.protocol.http.documentvalidation.TextContent;
+import wicket.util.tester.WicketTester;
 
 /**
- * Simple application that demonstrates the mock http application code (and
- * checks that it is working)
+ * Simple tester that demonstrates the mock http tester code (and checks that it
+ * is working)
  * 
  * @author Chris Turner
  */
@@ -37,7 +38,7 @@
 {
 	private static final Log log = LogFactory.getLog(WicketTagPanelTest.class);
 
-	private MockWebApplication application;
+	private WicketTester tester;
 
 	/**
 	 * Create the test.
@@ -54,8 +55,7 @@
 	protected void setUp() throws Exception
 	{
 		super.setUp();
-		application = new MockWebApplication(null);
-		application.setHomePage(WicketPanelPage.class);
+		tester = new WicketTester(WicketPanelPage.class);
 	}
 
 	/**
@@ -64,11 +64,11 @@
 	public void testRenderHomePage() throws Exception
 	{
 		// Do the processing
-		application.setupRequestAndResponse();
-		application.processRequestCycle();
+		tester.setupRequestAndResponse();
+		tester.processRequestCycle();
 
 		// Validate the document
-		String document = application.getServletResponse().getDocument();
+		String document = tester.getServletResponse().getDocument();
 		log.info(document);
 		assertTrue(validatePage1(document));
 	}
@@ -104,12 +104,12 @@
 	public void testRenderHomePageWicketTagRemoved() throws Exception
 	{
 		// Remove wicket tags from output
-		application.getMarkupSettings().setStripWicketTags(true);
-		application.setupRequestAndResponse();
-		application.processRequestCycle();
+		tester.getApplication().getMarkupSettings().setStripWicketTags(true);
+		tester.setupRequestAndResponse();
+		tester.processRequestCycle();
 
 		// Validate the document
-		String document = application.getServletResponse().getDocument();
+		String document = tester.getServletResponse().getDocument();
 		log.info(document);
 		assertTrue(validatePage2(document));
 	}

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/portlet/MockPortletApplication.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/portlet/MockPortletApplication.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/portlet/MockPortletApplication.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/portlet/MockPortletApplication.java Mon Nov  6 05:33:20 2006
@@ -44,7 +44,7 @@
 
 /**
  * This class provides a mock implementation of a Wicket portlet based
- * application that can be used for testing. It emulates all of the
+ * tester that can be used for testing. It emulates all of the
  * functionality of an Portlet in a controlled, single-threaded environment. It
  * is supported with mock objects for PortletSession, PortletRequest,
  * PortletResponse and PortletContext.
@@ -135,7 +135,7 @@
 
 		getDebugSettings().setSerializeSessionAttributes(false);
 
-		// Call init method of web application
+		// Call init method of web tester
 		this.init();
 
 		// We initialize components here rather than in the constructor or
@@ -187,7 +187,7 @@
 	}
 
 	/**
-	 * Sets the home page for this mock application
+	 * Sets the home page for this mock tester
 	 * 
 	 * @param clazz
 	 */

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/portlet/MockPortletApplicationTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/portlet/MockPortletApplicationTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/portlet/MockPortletApplicationTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/portlet/MockPortletApplicationTest.java Mon Nov  6 05:33:20 2006
@@ -41,7 +41,7 @@
 import wicket.util.diff.DiffUtil;
 
 /**
- * Simple application that demonstrates the mock portlet application code (and
+ * Simple tester that demonstrates the mock portlet tester code (and
  * checks that it is working)
  * 
  * @author Janne Hietam&auml;ki (jannehietamaki)

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/resource/ApplicationStringResourceLoaderTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/resource/ApplicationStringResourceLoaderTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/resource/ApplicationStringResourceLoaderTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/resource/ApplicationStringResourceLoaderTest.java Mon Nov  6 05:33:20 2006
@@ -21,9 +21,11 @@
 import java.util.Locale;
 
 import junit.framework.Assert;
-import wicket.protocol.http.MockWebApplication;
+import wicket.Page;
+import wicket.protocol.http.WebApplication;
 import wicket.resource.loader.ClassStringResourceLoader;
 import wicket.resource.loader.IStringResourceLoader;
+import wicket.util.tester.WicketTester;
 
 /**
  * Tests for the <code>ApplicationStringResourceLoader</code> class.
@@ -61,8 +63,16 @@
 	@Override
 	public void testLoaderUnknownResources()
 	{
-		MockWebApplication app = new MockWebApplication(null);
-		IStringResourceLoader loader = new ClassStringResourceLoader(app, app.getClass());
+		application = new WicketTester(new WebApplication()
+		{
+			@Override
+			public Class<? extends Page> getHomePage()
+			{
+				return null;
+			}
+		}).getApplication();
+		
+		IStringResourceLoader loader = createLoader();
 		Assert.assertNull("Unknown resource should return null", loader.loadStringResource(
 				component.getClass(), "test.string", Locale.getDefault(), null));
 	}

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/resource/ComponentStringResourceLoaderTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/resource/ComponentStringResourceLoaderTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/resource/ComponentStringResourceLoaderTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/resource/ComponentStringResourceLoaderTest.java Mon Nov  6 05:33:20 2006
@@ -53,7 +53,7 @@
 	@Override
 	protected IStringResourceLoader createLoader()
 	{
-		return new ComponentStringResourceLoader(new DummyApplication());
+		return new ComponentStringResourceLoader(this.application);
 	}
 
 	/**
@@ -67,7 +67,7 @@
 		{
 			private static final long serialVersionUID = 1L;
 		};
-		IStringResourceLoader loader = new ComponentStringResourceLoader(new DummyApplication());
+		IStringResourceLoader loader = new ComponentStringResourceLoader(this.application);
 		Assert.assertNull("Missing resource should return null", loader.loadStringResource(c
 				.getClass(), "test.string.bad", Locale.getDefault(), null));
 	}
@@ -89,7 +89,7 @@
 		MockComponentStringResourceLoaderTestPage p = new MockComponentStringResourceLoaderTestPage();
 		WebMarkupContainer panel = new WebMarkupContainer(p, "component");
 		DummyComponent c = new DummyComponent(panel, "hello", application);
-		IStringResourceLoader loader = new ComponentStringResourceLoader(new DummyApplication());
+		IStringResourceLoader loader = new ComponentStringResourceLoader(this.application);
 		Assert.assertEquals("Valid resourse string should be found", "Component string", loader
 				.loadStringResource(c.getClass(), "component.string", Locale.getDefault(), null));
 	}
@@ -100,7 +100,7 @@
 	public void testLoadDirectFromPage()
 	{
 		DummyPage p = new DummyPage();
-		IStringResourceLoader loader = new ComponentStringResourceLoader(new DummyApplication());
+		IStringResourceLoader loader = new ComponentStringResourceLoader(this.application);
 		Assert
 				.assertEquals("Valid resourse string should be found", "Another string", loader
 						.loadStringResource(p.getClass(), "another.test.string", Locale
@@ -113,7 +113,7 @@
 	public void testSearchClassHierarchyFromPage()
 	{
 		DummySubClassPage p = new DummySubClassPage();
-		IStringResourceLoader loader = new ComponentStringResourceLoader(new DummyApplication());
+		IStringResourceLoader loader = new ComponentStringResourceLoader(this.application);
 		Assert.assertEquals("Valid resource string should be found", "SubClass Test String",
 				loader.loadStringResource(p.getClass(), "subclass.test.string",
 						Locale.getDefault(), null));

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/resource/DummyApplication.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/resource/DummyApplication.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/resource/DummyApplication.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/resource/DummyApplication.java Mon Nov  6 05:33:20 2006
@@ -18,20 +18,30 @@
  */
 package wicket.resource;
 
-import wicket.util.tester.WicketTester;
+import wicket.Page;
+import wicket.protocol.http.WebApplication;
 
 /**
- * Dummy application used for resource loader testing.
+ * Dummy tester used for resource loader testing.
  * 
  * @author Chris Turner
  */
-public class DummyApplication extends WicketTester
+public class DummyApplication extends WebApplication
 {
 	/**
-	 * Create the dummy application.
+	 * Create the dummy tester.
 	 */
 	public DummyApplication()
 	{
-		super(null);
+	}
+
+	/**
+	 * 
+	 * @see wicket.Application#getHomePage()
+	 */
+	@Override
+	public Class<? extends Page> getHomePage()
+	{
+		return DummyPage.class;
 	}
 }

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/resource/StringResourceLoaderTestBase.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/resource/StringResourceLoaderTestBase.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/resource/StringResourceLoaderTestBase.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/resource/StringResourceLoaderTestBase.java Mon Nov  6 05:33:20 2006
@@ -22,10 +22,12 @@
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
+import wicket.Application;
 import wicket.Component;
 import wicket.MockPageWithOneComponent;
 import wicket.Page;
 import wicket.resource.loader.IStringResourceLoader;
+import wicket.util.tester.WicketTester;
 
 /**
  * Abstract base class providing common test functionality to ensure that all
@@ -35,12 +37,11 @@
  */
 public abstract class StringResourceLoaderTestBase extends TestCase
 {
-
 	// The loader to test
 	protected IStringResourceLoader loader;
 
-	// The dummy application
-	protected DummyApplication application;
+	// The dummy tester
+	protected Application application;
 
 	// The dummy component
 	protected Component component;
@@ -67,7 +68,8 @@
 	protected void setUp() throws Exception
 	{
 		super.setUp();
-		this.application = new DummyApplication();
+		
+		this.application = new WicketTester().getApplication();
 		Page page = new MockPageWithOneComponent();
 		this.component = new DummyComponent(page, "component", this.application);
 		this.loader = createLoader();
@@ -131,5 +133,3 @@
 	public abstract void testLoaderUnknownResources();
 
 }
-
-// 

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/session/DefaultPageFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/session/DefaultPageFactoryTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/session/DefaultPageFactoryTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/session/DefaultPageFactoryTest.java Mon Nov  6 05:33:20 2006
@@ -102,8 +102,8 @@
 	 */
 	public void testAbortAndRespondContract()
 	{
-		application.setupRequestAndResponse();
-		application.createRequestCycle();
+		tester.setupRequestAndResponse();
+		tester.createRequestCycle();
 		try
 		{
 			pageFactory.newPage(AbortAndRespondPage1.class);

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/stateless/StatelessComponentPage_result.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/stateless/StatelessComponentPage_result.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/stateless/StatelessComponentPage_result.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/stateless/StatelessComponentPage_result.html Mon Nov  6 05:33:20 2006
@@ -1,5 +1,5 @@
-<html>
-<body>
-<a href="/WicketTester/WicketTester?wicket:bookmarkablePage=:wicket.stateless.StatelessComponentPage&amp;wicket:interface=:0:link::ILinkListener" wicket:id="link">test</a>
-</body>
+<html>
+<body>
+<a href="/DummyApplication/DummyApplication?wicket:bookmarkablePage=:wicket.stateless.StatelessComponentPage&amp;wicket:interface=:0:link::ILinkListener" wicket:id="link">test</a>
+</body>
 </html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/parse/metapattern/parsers/IndexedParamTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/parse/metapattern/parsers/IndexedParamTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/parse/metapattern/parsers/IndexedParamTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/parse/metapattern/parsers/IndexedParamTest.java Mon Nov  6 05:33:20 2006
@@ -23,6 +23,7 @@
 import wicket.protocol.http.WebRequestCycle;
 import wicket.request.target.coding.IndexedParamUrlCodingStrategy;
 import wicket.util.diff.DiffUtil;
+import wicket.util.tester.WicketTester;
 
 /**
  * Test [ 1470093 ] <wicket:link> does not accept numeric param names
@@ -47,21 +48,21 @@
 	 */
 	public void testPage() throws Exception
 	{
-		application.setHomePage(Page1.class);
-		application.mount(new IndexedParamUrlCodingStrategy("/page2", Page2.class));
+		tester = new WicketTester(Page1.class);
+		tester.getApplication().mount(new IndexedParamUrlCodingStrategy("/page2", Page2.class));
 
 		executeTest(Page1.class, "IndexedParamTest_ExpectedResult-1.html");
 
 		// Click the autolink
-		application.setupRequestAndResponse();
-		WebRequestCycle cycle = application.createRequestCycle();
-		((MockHttpServletRequest)application.getWicketRequest().getHttpServletRequest()).setURL("/WicketTester/WicketTester/page2/abc");
-		application.processRequestCycle(cycle);
+		tester.setupRequestAndResponse();
+		WebRequestCycle cycle = tester.createRequestCycle();
+		((MockHttpServletRequest)tester.getWicketRequest().getHttpServletRequest()).setURL("/WicketTester$1/WicketTester$1/page2/abc");
+		tester.processRequestCycle(cycle);
 		
-		assertEquals(Page2.class, application.getLastRenderedPage().getClass());
+		assertEquals(Page2.class, tester.getLastRenderedPage().getClass());
 
 		// Validate the document
-		String document = application.getServletResponse().getDocument();
+		String document = tester.getServletResponse().getDocument();
 		assertTrue(DiffUtil.validatePage(document, this.getClass(), "IndexedParamTest_ExpectedResult-2.html"));
 	}
 }

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/parse/metapattern/parsers/IndexedParamTest_ExpectedResult-1.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/parse/metapattern/parsers/IndexedParamTest_ExpectedResult-1.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/parse/metapattern/parsers/IndexedParamTest_ExpectedResult-1.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/parse/metapattern/parsers/IndexedParamTest_ExpectedResult-1.html Mon Nov  6 05:33:20 2006
@@ -1,6 +1,6 @@
-<html>
-<body>
-    Link:
-    <wicket:link><a href="/WicketTester/WicketTester/page2/abc">Page 1</a></wicket:link>
-</body>
+<html>
+<body>
+    Link:
+    <wicket:link><a href="/WicketTester$1/WicketTester$1/page2/abc">Page 1</a></wicket:link>
+</body>
 </html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/FormTesterTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/FormTesterTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/FormTesterTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/FormTesterTest.java Mon Nov  6 05:33:20 2006
@@ -36,8 +36,8 @@
 	 */
 	public void testFormTester()
 	{
-		application.startPage(MockFormPage.class);
-		MockFormPage page = (MockFormPage)application.getLastRenderedPage();
+		tester.startPage(MockFormPage.class);
+		MockFormPage page = (MockFormPage)tester.getLastRenderedPage();
 		MockDomainObject domainObject = page.getDomainObject();
 		
 		assertNotNull(domainObject);
@@ -45,7 +45,7 @@
 		assertNull(domainObject.getTextarea());
 		assertFalse(domainObject.isCheckbox());
 		
-		FormTester formTester = application.newFormTester("form");
+		FormTester formTester = tester.newFormTester("form");
 		formTester.setValue("text", "Mock text value");
 		formTester.setValue("textarea", "Mock textarea value");
 		formTester.setValue("checkbox", "true");
@@ -64,18 +64,18 @@
 	 */
 	public void testAddFile()
 	{
-		application.startPage(MockFormFileUploadPage.class);
-		MockFormFileUploadPage page = (MockFormFileUploadPage)application.getLastRenderedPage();
+		tester.startPage(MockFormFileUploadPage.class);
+		MockFormFileUploadPage page = (MockFormFileUploadPage)tester.getLastRenderedPage();
 		MockDomainObjectFileUpload domainObject = page.getDomainObject();
 		
-		application.createRequestCycle();
+		tester.createRequestCycle();
 		
 		assertNull(page.getFileUpload());
 		assertNotNull(domainObject);
 		assertNull(domainObject.getText());
 		
 		
-		FormTester formTester = application.newFormTester("form");
+		FormTester formTester = tester.newFormTester("form");
 		formTester.setFile("file", new File("pom.xml"), "text/xml");
 		formTester.setValue("text", "Mock value");
 		formTester.submit();

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_2/Test.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_2/Test.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_2/Test.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_2/Test.java Mon Nov  6 05:33:20 2006
@@ -44,7 +44,7 @@
 			}
 		};
 
-		tester.getSecuritySettings().setAuthorizationStrategy(authorizationStrategy);
+		tester.getApplication().getSecuritySettings().setAuthorizationStrategy(authorizationStrategy);
 
 		tester.startPage(RedirectPage.class);
 		tester.assertRenderedPage(LoginPage.class);

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_3/FormTesterTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_3/FormTesterTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_3/FormTesterTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_3/FormTesterTest.java Mon Nov  6 05:33:20 2006
@@ -57,7 +57,7 @@
 		books = new Book[] { new Book("1", "book1"), new Book("2", "book2"),
 				new Book("3", "book3"), new Book("4", "book4") };
 
-		choicePage = (ChoicePage)application.startPage(new ITestPageSource()
+		choicePage = (ChoicePage)tester.startPage(new ITestPageSource()
 		{
 			private static final long serialVersionUID = 1L;
 
@@ -66,7 +66,7 @@
 				return new ChoicePage<Book>(Arrays.asList(books));
 			}
 		});
-		formTester = application.newFormTester("choiceForm");
+		formTester = tester.newFormTester("choiceForm");
 	}
 
 	/**
@@ -172,7 +172,7 @@
 		formTester.submit();
 		assertFalse(choicePage.anotherButtonPressed);
 
-		formTester = application.newFormTester("choiceForm");
+		formTester = tester.newFormTester("choiceForm");
 		formTester.submit("anotherButton");
 		assertTrue(choicePage.anotherButtonPressed);
 	}

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_4/FormTesterTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_4/FormTesterTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_4/FormTesterTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_4/FormTesterTest.java Mon Nov  6 05:33:20 2006
@@ -20,6 +20,7 @@
 
 import wicket.WicketTestCase;
 import wicket.util.tester.FormTester;
+import wicket.util.tester.WicketTester;
 
 /**
  * @author Ingram Chen
@@ -47,20 +48,20 @@
 	 */
 	public void test_1() throws Exception
 	{
-		application.setHomePage(EmailPage.class);
-		application.setupRequestAndResponse();
-		application.processRequestCycle();
+		tester = new WicketTester(EmailPage.class);
+		tester.setupRequestAndResponse();
+		tester.processRequestCycle();
 
-		assertEquals(EmailPage.class, application.getLastRenderedPage().getClass());
-		EmailPage page = (EmailPage)application.getLastRenderedPage();
+		assertEquals(EmailPage.class, tester.getLastRenderedPage().getClass());
+		EmailPage page = (EmailPage)tester.getLastRenderedPage();
 
-		FormTester formTester = application.newFormTester("form");
+		FormTester formTester = tester.newFormTester("form");
 
 		formTester.setValue("email", "a");
 		formTester.submit();
 
-		assertEquals(EmailPage.class, application.getLastRenderedPage().getClass());
-		page = (EmailPage)application.getLastRenderedPage();
+		assertEquals(EmailPage.class, tester.getLastRenderedPage().getClass());
+		page = (EmailPage)tester.getLastRenderedPage();
 
 		assertNull(page.getEmail());
 		assertTrue(page.getFeedbackMessages().hasMessageFor(page.get("form:email")));

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/ListTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/ListTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/ListTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/ListTest.java Mon Nov  6 05:33:20 2006
@@ -19,6 +19,7 @@
 package wicket.util.tester.apps_5;
 
 import junit.framework.TestCase;
+import wicket.util.tester.WicketTester;
 
 /**
  * @author janne
@@ -27,6 +28,7 @@
 {
 	/**
 	 * Construct.
+	 * 
 	 * @param name
 	 */
 	public ListTest(String name)
@@ -39,7 +41,7 @@
 	 */
 	public void test1() throws Exception
 	{
-		AppTester tester = new AppTester();		
+		WicketTester tester = new WicketTester(new MyApplication());
 		tester.startPage(new ListPage());
 	}
 }

Copied: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/MyApplication.java (from r471520, incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/AppTester.java)
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/MyApplication.java?view=diff&rev=471726&p1=incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/AppTester.java&r1=471520&p2=incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/MyApplication.java&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/AppTester.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_5/MyApplication.java Mon Nov  6 05:33:20 2006
@@ -19,19 +19,18 @@
 package wicket.util.tester.apps_5;
 
 import wicket.Page;
-import wicket.util.tester.WicketTester;
+import wicket.protocol.http.WebApplication;
 
 /**
  * 
  */
-public class AppTester extends WicketTester
+public class MyApplication extends WebApplication
 {
 	/**
 	 * Construct.
 	 */
-	public AppTester()
+	public MyApplication()
 	{
-		super("/admin");
 	}
 
 	@Override

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_6/AjaxLinkClickTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_6/AjaxLinkClickTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_6/AjaxLinkClickTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_6/AjaxLinkClickTest.java Mon Nov  6 05:33:20 2006
@@ -77,7 +77,7 @@
 			}
 		};
 
-		application.startPage(new ITestPageSource()
+		tester.startPage(new ITestPageSource()
 		{
 			/**
 			 * 
@@ -90,7 +90,7 @@
 			}
 		});
 
-		application.clickLink("ajaxLink");
+		tester.clickLink("ajaxLink");
 
 		assertTrue(linkClicked);
 		assertNotNull(ajaxRequestTarget);
@@ -119,7 +119,7 @@
 			}
 		};
 
-		application.startPage(new ITestPageSource()
+		tester.startPage(new ITestPageSource()
 		{
 			/**
 			 * 
@@ -132,7 +132,7 @@
 			}
 		});
 
-		application.clickLink("ajaxLink");
+		tester.clickLink("ajaxLink");
 
 		assertTrue(linkClicked);
 		assertNotNull(ajaxRequestTarget);
@@ -159,7 +159,7 @@
 			}
 		};
 
-		application.startPage(new ITestPageSource()
+		tester.startPage(new ITestPageSource()
 		{
 			/**
 			 * 
@@ -173,7 +173,7 @@
 		});
 
 		// Click the link with ajax disabled
-		application.clickLink("ajaxLink", false);
+		tester.clickLink("ajaxLink", false);
 
 		assertTrue(linkClicked);
 		assertNull(ajaxRequestTarget);

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_6/AjaxSubmitLinkClickTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_6/AjaxSubmitLinkClickTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_6/AjaxSubmitLinkClickTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_6/AjaxSubmitLinkClickTest.java Mon Nov  6 05:33:20 2006
@@ -71,7 +71,7 @@
 			}
 		};
 
-		application.startPage(new ITestPageSource()
+		tester.startPage(new ITestPageSource()
 		{
 			private static final long serialVersionUID = 1L;
 
@@ -81,13 +81,13 @@
 			}
 		});
 
-		application.assertRenderedPage(MockPageWithFormAndLink.class);
+		tester.assertRenderedPage(MockPageWithFormAndLink.class);
 
 		// Change the name in the textfield
 		page.getNameField().setModelValue("new mock value");
 
 		// Click the submit link
-		application.clickLink("link");
+		tester.clickLink("link");
 
 		// Has it really been clicked?
 		assertTrue(linkClicked);

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/ExpectedResult-1.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/ExpectedResult-1.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/ExpectedResult-1.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/ExpectedResult-1.html Mon Nov  6 05:33:20 2006
@@ -1,14 +1,14 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><span wicket:id="label">my wicket header label</span></head>
-<body>
-  <span wicket:id="myPanel"><wicket:panel>
-  MyPanel
-</wicket:panel></span>
-  <form action="/WicketTester/WicketTester?wicket:interface=:0:form::IFormSubmitListener" id="form" method="post" wicket:id="form">
-<div style="display:none"><input type="hidden" name="form:hf:fs" id="form:hf:fs"/>
-<input type="hidden" name="wicketState" id="form:hf:ws"/></div>
-	<input value="" type="text" name="email" wicket:id="email"/>
-  </form>
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><span wicket:id="label">my wicket header label</span></head>
+<body>
+  <span wicket:id="myPanel"><wicket:panel>
+  MyPanel
+</wicket:panel></span>
+  <form action="/WicketTester$1/WicketTester$1?wicket:interface=:0:form::IFormSubmitListener" id="form" method="post" wicket:id="form">
+<div style="display:none"><input type="hidden" name="form:hf:fs" id="form:hf:fs"/>
+<input type="hidden" name="wicketState" id="form:hf:ws"/></div>
+	<input value="" type="text" name="email" wicket:id="email"/>
+  </form>
+</body>
 </html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/ExpectedResult-2.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/ExpectedResult-2.html?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/ExpectedResult-2.html (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/ExpectedResult-2.html Mon Nov  6 05:33:20 2006
@@ -1,14 +1,14 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><span wicket:id="label">my wicket header label</span></head>
-<body>
-  <span wicket:id="myPanel"><wicket:panel>
-  MyPanel
-</wicket:panel></span>
-  <form action="/WicketTester/WicketTester?wicket:interface=:0:form::IFormSubmitListener" id="form" method="post" wicket:id="form">
-<div style="display:none"><input type="hidden" name="form:hf:fs" id="form:hf:fs"/>
-<input type="hidden" name="wicketState" id="form:hf:ws"/></div>
-	<input value="a" type="text" name="email" wicket:id="email"/>
-  </form>
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><span wicket:id="label">my wicket header label</span></head>
+<body>
+  <span wicket:id="myPanel"><wicket:panel>
+  MyPanel
+</wicket:panel></span>
+  <form action="/WicketTester$1/WicketTester$1?wicket:interface=:0:form::IFormSubmitListener" id="form" method="post" wicket:id="form">
+<div style="display:none"><input type="hidden" name="form:hf:fs" id="form:hf:fs"/>
+<input type="hidden" name="wicketState" id="form:hf:ws"/></div>
+	<input value="a" type="text" name="email" wicket:id="email"/>
+  </form>
+</body>
 </html>

Modified: incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/FormTesterTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/FormTesterTest.java?view=diff&rev=471726&r1=471725&r2=471726
==============================================================================
--- incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/FormTesterTest.java (original)
+++ incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_7/FormTesterTest.java Mon Nov  6 05:33:20 2006
@@ -21,6 +21,7 @@
 import wicket.WicketTestCase;
 import wicket.util.diff.DiffUtil;
 import wicket.util.tester.FormTester;
+import wicket.util.tester.WicketTester;
 
 /**
  * 
@@ -48,25 +49,25 @@
 	 */
 	public void test_1() throws Exception
 	{
-		application.setHomePage(EmailPage.class);
-		application.setupRequestAndResponse();
-		application.processRequestCycle();
+		tester = new WicketTester(EmailPage.class);
+		tester.setupRequestAndResponse();
+		tester.processRequestCycle();
 
-		String document = application.getServletResponse().getDocument();
+		String document = tester.getServletResponse().getDocument();
 		assertTrue(DiffUtil.validatePage(document, this.getClass(), "ExpectedResult-1.html"));
 
-		assertEquals(EmailPage.class, application.getLastRenderedPage().getClass());
-		EmailPage page = (EmailPage)application.getLastRenderedPage();
+		assertEquals(EmailPage.class, tester.getLastRenderedPage().getClass());
+		EmailPage page = (EmailPage)tester.getLastRenderedPage();
 
-		FormTester formTester = application.newFormTester("form");
+		FormTester formTester = tester.newFormTester("form");
 
 		formTester.setValue("email", "a");
 		formTester.submit();
 
-		page = (EmailPage)application.getLastRenderedPage();
+		page = (EmailPage)tester.getLastRenderedPage();
 		assertEquals(EmailPage.class, page.getClass());
 
-		document = application.getServletResponse().getDocument();
+		document = tester.getServletResponse().getDocument();
 		assertTrue(DiffUtil.validatePage(document, this.getClass(), "ExpectedResult-2.html"));
 	}
 }