aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java
index 98889eb865f..f9f31bcb287 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ServerClientTest.java
@@ -32,6 +32,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
+import org.sonar.wsclient.SonarClient;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@@ -136,6 +137,15 @@ public class ServerClientTest {
newServerClient().request("/foo");
}
+ @Test
+ public void should_give_access_to_ws_client() throws Exception {
+ server = new MockHttpServer();
+ server.start();
+
+ SonarClient wsClient = newServerClient().wsClient();
+ assertThat(wsClient).isNotNull();
+ }
+
private ServerClient newServerClient() {
when(settings.property(eq("sonar.host.url"), anyString())).thenReturn("http://localhost:" + server.getPort());
return new ServerClient(settings, new EnvironmentInformation("Junit", "4"));