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

    assertThat(params).isEmpty();
  }
Beispiel #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");
  }
Beispiel #3
0
 @Test
 public void should_search_by_text() throws Exception {
   UserQuery query = UserQuery.create().searchText("sim");
   assertThat(query.urlParams().get("s")).isEqualTo("sim");
 }
Beispiel #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");
 }