예제 #1
0
  @Test
  public void test_empty_params() throws Exception {
    UserQuery query = UserQuery.create();
    Map<String, Object> params = query.urlParams();

    assertThat(params).isEmpty();
  }
예제 #2
0
  @Test
  public void test_params() throws Exception {
    UserQuery query = UserQuery.create().includeDeactivated().logins("simon", "loic");
    Map<String, Object> params = query.urlParams();

    assertThat(params.get("includeDeactivated")).isEqualTo("true");
    assertThat(params.get("logins")).isEqualTo("simon,loic");
  }
예제 #3
0
 @Test
 public void should_search_by_text() throws Exception {
   UserQuery query = UserQuery.create().searchText("sim");
   assertThat(query.urlParams().get("s")).isEqualTo("sim");
 }
예제 #4
0
 @Test
 public void should_replace_logins() throws Exception {
   UserQuery query = UserQuery.create().logins("simon").logins("loic");
   assertThat(query.urlParams().get("logins")).isEqualTo("loic");
 }