Package org.sonar.wsclient.internal

Examples of org.sonar.wsclient.internal.HttpRequestFactory.post()


  }

  @Test
  public void return_result_before_timeout_of_synchronous_migration() {
    HttpRequestFactory requestFactory = mock(HttpRequestFactory.class);
    when(requestFactory.post(eq("/api/server/setup"), anyMap())).thenReturn(
      RUNNING_JSON, DONE_JSON
    );

    DefaultSystemClient client = new DefaultSystemClient(requestFactory);
    Migration migration = client.migrate(500L, 5L);
View Full Code Here


  @Test
  public void fail_if_missing_state() {
    // should never occur
    HttpRequestFactory requestFactory = mock(HttpRequestFactory.class);
    when(requestFactory.post(eq("/api/server/setup"), anyMap())).thenReturn(
      "{\"status\": \"ko\", \"message\": \"done\"}"
    );

    DefaultSystemClient client = new DefaultSystemClient(requestFactory);
    try {
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.