Package org.exoplatform.social.client.api.service

Examples of org.exoplatform.social.client.api.service.QueryParams.clear()


      //
      assertThat(queryPath, equalTo(""));
    }
    //add one Parameter
    {
      queryParams.clear();
      queryParams.append(QueryParams.IDENTITY_ID_PARAM.setValue("1234"));
     
      queryPath = queryParams.buildQuery();
      //     
      final String expectedQuery1 = "identity_id=1234";
View Full Code Here


      assertThat(queryPath, equalTo(expectedQuery1));
    }
   
    //add two Parameter
    {
      queryParams.clear();
     
      queryParams.append(QueryParams.IDENTITY_ID_PARAM.setValue("1234")).append(QueryParams.NUMBER_OF_COMMENTS_PARAM.setValue(2));
     
      queryPath = queryParams.buildQuery();
      //
View Full Code Here

      assertThat(queryPath, equalTo(expectedQuery2));
    }
   
    //Remove parameter
    {
      queryParams.clear();
      queryParams.append(QueryParams.IDENTITY_ID_PARAM.setValue("1234"));
      queryParams.remove(QueryParams.IDENTITY_ID_PARAM);
     
      queryPath = queryParams.buildQuery();
      //
View Full Code Here

      assertThat(queryPath, equalTo(expectedQuery3));
    }
   
    //add the Query Param Option which is existing.
    {
      queryParams.clear();
      queryParams.append(QueryParams.IDENTITY_ID_PARAM.setValue("1234")).append(QueryParams.NUMBER_OF_COMMENTS_PARAM.setValue(5));

      queryPath = queryParams.buildQuery();
     
      final String expectedQuery4 = "identity_id=1234&number_of_comments=5";
View Full Code Here

      assertThat("QueryParamOption which is existing", queryPath, equalTo(expectedQuery4));
    }
   
    //add all parameter
    {
      queryParams.clear();
      queryParams.append(QueryParams.IDENTITY_ID_PARAM.setValue("1234"))
                 .append(QueryParams.POSTER_IDENTITY_PARAM.setValue("1"))
                 .append(QueryParams.NUMBER_OF_COMMENTS_PARAM.setValue(10))
                 .append(QueryParams.NUMBER_OF_LIKES_PARAM.setValue(5))
                 .append(QueryParams.ACTIVITY_STREAM_PARAM.setValue("t"))
View Full Code Here

      //
      assertThat(option, nullValue());
    }
    //get QueryParamOption Not Null
    {
      queryParams.clear();
      queryParams.append(QueryParams.IDENTITY_ID_PARAM.setValue("1234"));
     
      QueryParamOption option = queryParams.get(QueryParams.IDENTITY_ID_PARAM);
     
      assertThat(option, notNullValue());
View Full Code Here

      assertThat((String)option.getValue(), equalTo("1234"));
    }
   
    //get QueryParamOption Not Null with more existing
    {
      queryParams.clear();
      queryParams.append(QueryParams.IDENTITY_ID_PARAM.setValue("1234"))
                        .append(QueryParams.POSTER_IDENTITY_PARAM.setValue("1"))
                        .append(QueryParams.NUMBER_OF_COMMENTS_PARAM.setValue(10))
                        .append(QueryParams.NUMBER_OF_LIKES_PARAM.setValue(5))
                        .append(QueryParams.ACTIVITY_STREAM_PARAM)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.