/*
 * $Id$ $Revision:
 * 1.5 $ $Date$
 * 
 * ==============================================================================
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.ajax.markup.html.componentMap;

import wicket.Page;
import wicket.WicketTestCase;
import wicket.markup.html.list.DiffUtil;

/**
 * Test for ajax handler.
 *
 * @author Juergen Donnerstag
 */
public class SimpleTestPanelTest extends WicketTestCase
{
	/**
	 * Construct.
	 * @param name
	 */
	public SimpleTestPanelTest(String name)
	{
		super(name);
	}

	/**
	 * @throws Exception
	 */
	public void testRenderHomePage_1() throws Exception
	{
	    executeTest(SimpleTestPage.class, "SimpleTestPageExpectedResult.html");
	    
		Page page = application.getLastRenderedPage();
		application.setupRequestAndResponse();
		application.getServletRequest().setRequestToRedirectString("?path=0:testPanel:baseSpan:linja1&interface=IBehaviorListener&behaviorId=0");
		application.processRequestCycle();
		String document = application.getServletResponse().getDocument();

		assertTrue(DiffUtil.validatePage(document, this.getClass(), "SimpleTestPageExpectedResult-1.html"));
	}
}

@@ -811,16 +811,78 @@
 iffUtil;
+%0Aimport wicket.protocol.http.request.WebRequestCodingStrategy;
 %0A%0A/**%0A *
@@ -1361,24 +1361,83 @@
 Response();%0A
+%09%09// TODO this is a fragile test as it depends on a string%0A
 %09%09applicatio
@@ -1485,16 +1485,21 @@
 tString(
+%0A%09%09%09%09
 %22?path=0
@@ -1557,18 +1557,73 @@
 ner&
-behaviorId
+%22%0A%09%09%09%09%09%09+ WebRequestCodingStrategy.BEHAVIOR_ID_PARAMETER_NAME + %22
 =0%22)

replaced behaviourId string by constant