Package com.ocpsoft.pretty.faces.config.mapping

Examples of com.ocpsoft.pretty.faces.config.mapping.RequestParameter


public class QueryParameterTest
{
    @Test
    public void testHashCodeAndEquals()
    {
        RequestParameter param1 = new QueryParameter("foo", "bar");
        RequestParameter param2 = new QueryParameter("foo", "bar");
        RequestParameter param3 = new QueryParameter("foo", "bar2");
        RequestParameter param4 = new QueryParameter("foo2", "bar");

        assertNotSame(param1.hashCode(), param3.hashCode());
        assertNotSame(param1.hashCode(), param4.hashCode());
        assertNotSame(param3.hashCode(), param4.hashCode());
        assertEquals(param1.hashCode(), param2.hashCode());

        assertNotSame(param1, param3);
        assertNotSame(param1, param4);
        assertNotSame(param3, param4);
View Full Code Here


   {
      UrlMapping mapping = config.getMappingById("4");
      List<QueryParameter> params = mapping.getQueryParams();

      assertEquals(1, params.size());
      RequestParameter param = params.get(0);
      RequestParameter expected = new QueryParameter("user", null, new ConstantExpression("#{deleteUserBean.userName}"));
      assertEquals(expected, param);
   }
View Full Code Here

   {
      UrlMapping mapping = config.getMappingById("6");
      List<QueryParameter> params = mapping.getQueryParams();

      assertEquals(2, params.size());
      RequestParameter name = new QueryParameter("name", null, new ConstantExpression("#{searchUserBean.userName}"));
      RequestParameter gender = new QueryParameter("gender", null, new ConstantExpression("#{searchUserBean.userGender}"));
      assertArrayEquals(new Object[] { name, gender }, params.toArray());
   }
View Full Code Here

TOP

Related Classes of com.ocpsoft.pretty.faces.config.mapping.RequestParameter

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.