aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2015-05-07 19:04:22 +0200
committerDavid Gageot <david@gageot.net>2015-05-07 19:12:29 +0200
commit5a587fb74fd9a8c8839b6f8582f5ff15f5183805 (patch)
treeb0201ec0afc1dad985a53c06c703a429d4bf095b /sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java
parent18834f5bf7f0bdd34912c46a83caaaac70db1e87 (diff)
downloadsonarqube-5a587fb74fd9a8c8839b6f8582f5ff15f5183805.tar.gz
sonarqube-5a587fb74fd9a8c8839b6f8582f5ff15f5183805.zip
Redundant throws clause in tests
Diffstat (limited to 'sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java
index 85a43f7c105..252a030d93f 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleKeyTest.java
@@ -34,14 +34,14 @@ public class RuleKeyTest {
}
@Test
- public void key_can_contain_colons() throws Exception {
+ public void key_can_contain_colons() {
RuleKey key = RuleKey.of("squid", "Key:With:Some::Colons");
assertThat(key.repository()).isEqualTo("squid");
assertThat(key.rule()).isEqualTo("Key:With:Some::Colons");
}
@Test
- public void repository_must_not_be_null() throws Exception {
+ public void repository_must_not_be_null() {
try {
RuleKey.of(null, "NullDeref");
fail();
@@ -51,7 +51,7 @@ public class RuleKeyTest {
}
@Test
- public void repository_must_not_be_empty() throws Exception {
+ public void repository_must_not_be_empty() {
try {
RuleKey.of("", "NullDeref");
fail();
@@ -61,7 +61,7 @@ public class RuleKeyTest {
}
@Test
- public void rule_must_not_be_null() throws Exception {
+ public void rule_must_not_be_null() {
try {
RuleKey.of("squid", null);
fail();
@@ -71,7 +71,7 @@ public class RuleKeyTest {
}
@Test
- public void rule_must_not_be_empty() throws Exception {
+ public void rule_must_not_be_empty() {
try {
RuleKey.of("squid", "");
fail();
@@ -81,7 +81,7 @@ public class RuleKeyTest {
}
@Test
- public void encode_and_decode_string() throws Exception {
+ public void encode_and_decode_string() {
RuleKey key = RuleKey.of("squid", "NullDeref");
String serialized = key.toString();
assertThat(serialized).isEqualTo("squid:NullDeref");
@@ -92,14 +92,14 @@ public class RuleKeyTest {
}
@Test
- public void parse_key_with_colons() throws Exception {
+ public void parse_key_with_colons() {
RuleKey key = RuleKey.parse("squid:Key:With:Some::Colons");
assertThat(key.repository()).isEqualTo("squid");
assertThat(key.rule()).isEqualTo("Key:With:Some::Colons");
}
@Test
- public void not_accept_bad_format() throws Exception {
+ public void not_accept_bad_format() {
try {
RuleKey.parse("foo");
fail();