diff options
Diffstat (limited to 'sonar-ws-client/src/test/java/org/sonar/wsclient/issue')
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultActionPlanClientTest.java | 14 | ||||
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultIssueClientTest.java | 22 |
2 files changed, 18 insertions, 18 deletions
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultActionPlanClientTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultActionPlanClientTest.java index a9b29aa8370..d6597c2e918 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultActionPlanClientTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultActionPlanClientTest.java @@ -37,7 +37,7 @@ public class DefaultActionPlanClientTest { @Test public void should_find_action_plans() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"actionPlans\": [{\"key\": \"382f6f2e-ad9d-424a-b973-9b065e04348a\",\n" + "\"name\": \"Long term\",\n" + "\"status\": \"CLOSED\",\n" + @@ -69,7 +69,7 @@ public class DefaultActionPlanClientTest { @Test public void should_create_action_plan() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"actionPlan\": {\"key\": \"382f6f2e-ad9d-424a-b973-9b065e04348a\"}}"); ActionPlanClient client = new DefaultActionPlanClient(requestFactory); @@ -81,7 +81,7 @@ public class DefaultActionPlanClientTest { @Test public void should_update_action_plan() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"actionPlan\": {\"key\": \"382f6f2e-ad9d-424a-b973-9b065e04348a\"}}"); ActionPlanClient client = new DefaultActionPlanClient(requestFactory); @@ -93,7 +93,7 @@ public class DefaultActionPlanClientTest { @Test public void should_delete_action_plan() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); ActionPlanClient client = new DefaultActionPlanClient(requestFactory); client.delete("382f6f2e-ad9d-424a-b973-9b065e04348a"); @@ -103,7 +103,7 @@ public class DefaultActionPlanClientTest { @Test public void should_fail_to_delete_action_plan() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnStatus(500); ActionPlanClient client = new DefaultActionPlanClient(requestFactory); @@ -117,7 +117,7 @@ public class DefaultActionPlanClientTest { @Test public void should_open_action_plan() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"actionPlan\": {\"key\": \"382f6f2e-ad9d-424a-b973-9b065e04348a\"}}"); ActionPlanClient client = new DefaultActionPlanClient(requestFactory); @@ -129,7 +129,7 @@ public class DefaultActionPlanClientTest { @Test public void should_close_action_plan() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"actionPlan\": {\"key\": \"382f6f2e-ad9d-424a-b973-9b065e04348a\"}}"); ActionPlanClient client = new DefaultActionPlanClient(requestFactory); diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultIssueClientTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultIssueClientTest.java index ae0d4c587ba..41118a61ff9 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultIssueClientTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/DefaultIssueClientTest.java @@ -36,7 +36,7 @@ public class DefaultIssueClientTest { @Test public void should_find_issues() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issues\": [{\"key\": \"ABCDE\"}]}"); IssueClient client = new DefaultIssueClient(requestFactory); @@ -50,7 +50,7 @@ public class DefaultIssueClientTest { @Test public void should_fail_to_find_issues() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnStatus(500); IssueClient client = new DefaultIssueClient(requestFactory); @@ -64,7 +64,7 @@ public class DefaultIssueClientTest { @Test public void should_set_severity() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issue\": {\"key\": \"ABCDE\"}}"); IssueClient client = new DefaultIssueClient(requestFactory); @@ -76,7 +76,7 @@ public class DefaultIssueClientTest { @Test public void should_assign() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issue\": {\"key\": \"ABCDE\"}}"); IssueClient client = new DefaultIssueClient(requestFactory); @@ -88,7 +88,7 @@ public class DefaultIssueClientTest { @Test public void should_unassign() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issue\": {\"key\": \"ABCDE\"}}"); IssueClient client = new DefaultIssueClient(requestFactory); @@ -100,7 +100,7 @@ public class DefaultIssueClientTest { @Test public void should_plan() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issue\": {\"key\": \"ABCDE\"}}"); IssueClient client = new DefaultIssueClient(requestFactory); @@ -112,7 +112,7 @@ public class DefaultIssueClientTest { @Test public void should_unplan() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issue\": {\"key\": \"ABCDE\"}}"); IssueClient client = new DefaultIssueClient(requestFactory); @@ -124,7 +124,7 @@ public class DefaultIssueClientTest { @Test public void should_create_issue() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issue\": {\"key\": \"ABCDE\"}}"); IssueClient client = new DefaultIssueClient(requestFactory); @@ -136,7 +136,7 @@ public class DefaultIssueClientTest { @Test public void should_get_transitions() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\n" + " \"transitions\": [\n" + " \"resolve\",\n" + @@ -154,7 +154,7 @@ public class DefaultIssueClientTest { @Test public void should_apply_transition() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issue\": {\"key\": \"ABCDE\"}}"); IssueClient client = new DefaultIssueClient(requestFactory); @@ -166,7 +166,7 @@ public class DefaultIssueClientTest { @Test public void should_add_comment() throws Exception { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url(), null, null); + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody(IOUtils.toString(getClass().getResourceAsStream("/org/sonar/wsclient/issue/DefaultIssueClientTest/add_comment_result.json"))); IssueClient client = new DefaultIssueClient(requestFactory); |