Package org.apache.wicket

Examples of org.apache.wicket.MockPageParametersAware


    tester.getRequest().getPostParameters().setParameterValue("p_1", "p_1_value");
    tester.getRequest().setParameter("q_1", "q_1_value");

    formTester.submit();

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    assertEquals("v1", page.getLastPostParameters().getParameterValue("textfield").toString());
    assertEquals("p_1_value", page.getLastPostParameters().getParameterValue("p_1").toString());
    assertEquals("q_1_value", page.getLastQueryParameters().getParameterValue("q_1").toString());
  }
View Full Code Here


    tester.getRequest().getPostParameters().setParameterValue("p_1", "p_1_value");
    tester.getRequest().setParameter("q_1", "q_1_value");

    formTester.submit();

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    assertEquals("v1", page.getLastPostParameters().getParameterValue("textfield").toString());
    assertEquals("p_1_value", page.getLastPostParameters().getParameterValue("p_1").toString());
    assertEquals("q_1_value", page.getLastQueryParameters().getParameterValue("q_1").toString());
  }
View Full Code Here

  {
    tester.getRequest().setParameter("p1", "v1");

    tester.startPage(MockPageParametersAware.class);

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    assertEquals("v1", page.getLastQueryParameters().getParameterValue("p1").toString());
  }
View Full Code Here

    tester.getRequest().setParameter("q_2", "q_2_value");
    tester.getRequest().setUrl(url);

    tester.processRequest();

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    assertEquals("q_1_value", page.getLastQueryParameters().getParameterValue("q_1").toString());
    assertEquals("q_2_value", page.getLastQueryParameters().getParameterValue("q_2").toString());
  }
View Full Code Here

    tester.getRequest().addParameter("q_2", "q_2_value_2");
    tester.getRequest().setUrl(url);

    tester.processRequest();

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    IRequestParameters lastQueryParameter = page.getLastQueryParameters();
    List<StringValue> q1ParameterValues = lastQueryParameter.getParameterValues("q_1");
    assertTrue(q1ParameterValues.contains(StringValue.valueOf("q_1_value_1")));
    assertTrue(q1ParameterValues.contains(StringValue.valueOf("q_1_value_2")));
    List<StringValue> q2ParameterValues = lastQueryParameter.getParameterValues("q_2");
    assertTrue(q2ParameterValues.contains(StringValue.valueOf("q_2_value_1")));
View Full Code Here

  {
    tester.getRequest().setParameter("p1", "v1");

    tester.startPage(MockPageParametersAware.class);

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    assertEquals("v1", page.getLastQueryParameters().getParameterValue("p1").toString());
  }
View Full Code Here

    tester.getRequest().setParameter("q_2", "q_2_value");
    tester.getRequest().setUrl(url);

    tester.processRequest();

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    assertEquals("q_1_value", page.getLastQueryParameters().getParameterValue("q_1").toString());
    assertEquals("q_2_value", page.getLastQueryParameters().getParameterValue("q_2").toString());
  }
View Full Code Here

    tester.getRequest().addParameter("q_2", "q_2_value_2");
    tester.getRequest().setUrl(url);

    tester.processRequest();

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    IRequestParameters lastQueryParameter = page.getLastQueryParameters();
    List<StringValue> q1ParameterValues = lastQueryParameter.getParameterValues("q_1");
    assertTrue(q1ParameterValues.contains(StringValue.valueOf("q_1_value_1")));
    assertTrue(q1ParameterValues.contains(StringValue.valueOf("q_1_value_2")));
    List<StringValue> q2ParameterValues = lastQueryParameter.getParameterValues("q_2");
    assertTrue(q2ParameterValues.contains(StringValue.valueOf("q_2_value_1")));
View Full Code Here

    tester.getRequest().getPostParameters().setParameterValue("p_1", "p_1_value");
    tester.getRequest().setParameter("q_1", "q_1_value");

    formTester.submit();

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    assertEquals("v1", page.getLastPostParameters().getParameterValue("textfield").toString());
    assertEquals("p_1_value", page.getLastPostParameters().getParameterValue("p_1").toString());
    assertEquals("q_1_value", page.getLastQueryParameters().getParameterValue("q_1").toString());
  }
View Full Code Here

    tester.getRequest().getPostParameters().setParameterValue("p_1", "p_1_value");
    tester.getRequest().setParameter("q_1", "q_1_value");

    formTester.submit();

    MockPageParametersAware page = (MockPageParametersAware)tester.getLastRenderedPage();
    assertEquals("v1", page.getLastPostParameters().getParameterValue("textfield").toString());
    assertEquals("p_1_value", page.getLastPostParameters().getParameterValue("p_1").toString());
    assertEquals("q_1_value", page.getLastQueryParameters().getParameterValue("q_1").toString());
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.MockPageParametersAware

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.