Example #1
0
  @Test
  public void testIt() {
    A10ClientImpl c = Mockito.mock(A10ClientImpl.class);

    RequestBuilder b = new RequestBuilder(c, "test");

    Assertions.assertThat(b.getParams()).containsEntry("method", "test").hasSize(1);

    Assertions.assertThat(b.method("foo").getParams()).containsEntry("method", "foo").hasSize(1);

    Assertions.assertThat(b.param("a", "1").getParams())
        .containsEntry("method", "foo")
        .containsEntry("a", "1")
        .hasSize(2);
    Assertions.assertThat(b.param("a", "2").getParams())
        .containsEntry("method", "foo")
        .containsEntry("a", "2")
        .hasSize(2);
  }