diff options
author | David Gageot <david@gageot.net> | 2015-05-07 19:04:22 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2015-05-07 19:12:29 +0200 |
commit | 5a587fb74fd9a8c8839b6f8582f5ff15f5183805 (patch) | |
tree | b0201ec0afc1dad985a53c06c703a429d4bf095b /server/sonar-ws-client/src | |
parent | 18834f5bf7f0bdd34912c46a83caaaac70db1e87 (diff) | |
download | sonarqube-5a587fb74fd9a8c8839b6f8582f5ff15f5183805.tar.gz sonarqube-5a587fb74fd9a8c8839b6f8582f5ff15f5183805.zip |
Redundant throws clause in tests
Diffstat (limited to 'server/sonar-ws-client/src')
9 files changed, 16 insertions, 16 deletions
diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java index 63889f42730..7c1ed06d237 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java @@ -111,7 +111,7 @@ public class SonarClientTest { } @Test - public void get() throws Exception { + public void get() { HttpRequestFactory requestFactory = mock(HttpRequestFactory.class); SonarClient client = new SonarClient(requestFactory); @@ -126,7 +126,7 @@ public class SonarClientTest { } @Test - public void post() throws Exception { + public void post() { HttpRequestFactory requestFactory = mock(HttpRequestFactory.class); SonarClient client = new SonarClient(requestFactory); @@ -140,7 +140,7 @@ public class SonarClientTest { } @Test - public void fail_if_odd_number_arguments() throws Exception { + public void fail_if_odd_number_arguments() { HttpRequestFactory requestFactory = mock(HttpRequestFactory.class); SonarClient client = new SonarClient(requestFactory); @@ -153,7 +153,7 @@ public class SonarClientTest { } @Test - public void fail_if_null_property_key() throws Exception { + public void fail_if_null_property_key() { HttpRequestFactory requestFactory = mock(HttpRequestFactory.class); SonarClient client = new SonarClient(requestFactory); diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java index c1ff002fa00..930b24569fe 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java @@ -98,7 +98,7 @@ public class SonarTest { } @Test(expected = ConnectionException.class) - public void failWhenConnectionIsClosed() throws Exception { + public void failWhenConnectionIsClosed() { Sonar fakeSonar = Sonar.create("http://localhost:70"); fakeSonar.findAll(MetricQuery.all()); } diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/HttpRequestFactoryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/HttpRequestFactoryTest.java index 0e790b07650..54bd54782bc 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/HttpRequestFactoryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/internal/HttpRequestFactoryTest.java @@ -123,7 +123,7 @@ public class HttpRequestFactoryTest { } @Test - public void beginning_slash_is_optional() throws Exception { + public void beginning_slash_is_optional() { HttpRequestFactory factory = new HttpRequestFactory(httpServer.url()); factory.get("api/foo", Collections.<String, Object>emptyMap()); assertThat(httpServer.requestedPath()).isEqualTo("/api/foo"); diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultActionPlanClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultActionPlanClientTest.java index 9621c9878fc..8cb916be1fc 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultActionPlanClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultActionPlanClientTest.java @@ -79,7 +79,7 @@ public class DefaultActionPlanClientTest { } @Test - public void should_create_action_plan() throws Exception { + public void should_create_action_plan() { HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.stubResponseBody("{\"actionPlan\": {\"key\": \"382f6f2e-ad9d-424a-b973-9b065e04348a\"}}"); diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/system/internal/DefaultSystemClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/system/internal/DefaultSystemClientTest.java index 79c869e5c25..5cc23219504 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/system/internal/DefaultSystemClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/system/internal/DefaultSystemClientTest.java @@ -61,7 +61,7 @@ public class DefaultSystemClientTest { } @Test - public void fail_if_rate_is_greater_than_timeout() throws Exception { + public void fail_if_rate_is_greater_than_timeout() { try { DefaultSystemClient client = new DefaultSystemClient(mock(HttpRequestFactory.class)); client.migrate(5L, 50L); diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java index 17592ec2909..7fb56905784 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java @@ -32,7 +32,7 @@ import static org.junit.Assert.assertThat; public class PluginUnmarshallerTest extends UnmarshallerTestCase { @Test - public void toModel() throws Exception { + public void toModel() { WSUtils.setInstance(new JdkUtils()); List<Plugin> plugins = new PluginUnmarshaller().toModels(loadFile("/plugins/plugins.json")); diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java index 60d1f1223e6..965d27217bc 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java @@ -52,7 +52,7 @@ public class TimeMachineUnmarshallerTest extends UnmarshallerTestCase { } @Test - public void should_accept_null_values() throws Exception { + public void should_accept_null_values() { TimeMachine timeMachine = new TimeMachineUnmarshaller().toModel(loadFile("/timemachine/null-values.json")); assertThat(timeMachine.getCells()[0].getValues().length).isEqualTo(2); @@ -64,7 +64,7 @@ public class TimeMachineUnmarshallerTest extends UnmarshallerTestCase { } @Test - public void should_cast_values() throws Exception { + public void should_cast_values() { TimeMachine timeMachine = new TimeMachineUnmarshaller().toModel(loadFile("/timemachine/typed-values.json")); assertThat(timeMachine.getCells()[0].getValues().length).isEqualTo(2); diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/DefaultUserClientTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/DefaultUserClientTest.java index e59927c5dde..d521d115053 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/DefaultUserClientTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/DefaultUserClientTest.java @@ -63,7 +63,7 @@ public class DefaultUserClientTest { } @Test - public void should_create_user() throws Exception { + public void should_create_user() { httpServer.stubResponseBody("{\"user\":{\"login\":\"daveloper\",\"name\":\"daveloper\",\"email\":null}}"); UserParameters params = UserParameters.create().login("daveloper").password("pass1").passwordConfirmation("pass1"); @@ -82,7 +82,7 @@ public class DefaultUserClientTest { } @Test - public void should_update_user() throws Exception { + public void should_update_user() { httpServer.stubResponseBody("{\"user\":{\"login\":\"daveloper\",\"name\":\"daveloper\",\"email\":\"new_email\"}}"); UserParameters params = UserParameters.create().login("daveloper").email("new_email"); @@ -100,7 +100,7 @@ public class DefaultUserClientTest { } @Test - public void should_deactivate_user() throws Exception { + public void should_deactivate_user() { httpServer.stubStatusCode(200); client.deactivate("daveloper"); diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/UserQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/UserQueryTest.java index 20f4b9893d4..5cad47114ef 100644 --- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/UserQueryTest.java +++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/user/UserQueryTest.java @@ -44,13 +44,13 @@ public class UserQueryTest { } @Test - public void should_replace_logins() throws Exception { + public void should_replace_logins() { UserQuery query = UserQuery.create().logins("simon").logins("loic"); assertThat(query.urlParams().get("logins")).isEqualTo("loic"); } @Test - public void should_search_by_text() throws Exception { + public void should_search_by_text() { UserQuery query = UserQuery.create().searchText("sim"); assertThat(query.urlParams().get("s")).isEqualTo("sim"); |