aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/test/java/org/sonar/batch/index
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-batch/src/test/java/org/sonar/batch/index
parent18834f5bf7f0bdd34912c46a83caaaac70db1e87 (diff)
downloadsonarqube-5a587fb74fd9a8c8839b6f8582f5ff15f5183805.tar.gz
sonarqube-5a587fb74fd9a8c8839b6f8582f5ff15f5183805.zip
Redundant throws clause in tests
Diffstat (limited to 'sonar-batch/src/test/java/org/sonar/batch/index')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java12
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java8
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/ResourceCacheTest.java4
3 files changed, 12 insertions, 12 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java
index 0235af3dc89..9c85d02c0fd 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java
@@ -37,7 +37,7 @@ public class CacheTest {
Caches caches;
@Before
- public void start() throws Exception {
+ public void start() {
caches = CachesTest.createCacheOnTemp(temp);
caches.start();
}
@@ -48,7 +48,7 @@ public class CacheTest {
}
@Test
- public void one_part_key() throws Exception {
+ public void one_part_key() {
Cache<String> cache = caches.createCache("capitals");
assertThat(cache.get("france")).isNull();
@@ -97,7 +97,7 @@ public class CacheTest {
}
@Test
- public void two_parts_key() throws Exception {
+ public void two_parts_key() {
Cache<String> cache = caches.createCache("capitals");
assertThat(cache.get("europe", "france")).isNull();
@@ -153,7 +153,7 @@ public class CacheTest {
}
@Test
- public void three_parts_key() throws Exception {
+ public void three_parts_key() {
Cache<String> cache = caches.createCache("places");
assertThat(cache.get("europe", "france", "paris")).isNull();
@@ -229,7 +229,7 @@ public class CacheTest {
}
@Test
- public void remove_versus_clear() throws Exception {
+ public void remove_versus_clear() {
Cache<String> cache = caches.createCache("capitals");
cache.put("europe", "france", "paris");
cache.put("europe", "italy", "rome");
@@ -244,7 +244,7 @@ public class CacheTest {
}
@Test
- public void empty_cache() throws Exception {
+ public void empty_cache() {
Cache<String> cache = caches.createCache("empty");
assertThat(cache.get("foo")).isNull();
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java
index 35c8ec22309..83e2a99b948 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/CachesTest.java
@@ -53,7 +53,7 @@ public class CachesTest {
Caches caches;
@Before
- public void prepare() throws Exception {
+ public void prepare() {
caches = createCacheOnTemp(temp);
}
@@ -63,7 +63,7 @@ public class CachesTest {
}
@Test
- public void should_stop_and_clean_temp_dir() throws Exception {
+ public void should_stop_and_clean_temp_dir() {
File tempDir = caches.tempDir();
assertThat(tempDir).isDirectory().exists();
assertThat(caches.persistit()).isNotNull();
@@ -77,14 +77,14 @@ public class CachesTest {
}
@Test
- public void should_create_cache() throws Exception {
+ public void should_create_cache() {
caches.start();
Cache<Element> cache = caches.createCache("foo");
assertThat(cache).isNotNull();
}
@Test
- public void should_not_create_cache_twice() throws Exception {
+ public void should_not_create_cache_twice() {
caches.start();
caches.<Element>createCache("foo");
try {
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/ResourceCacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/ResourceCacheTest.java
index bd250b544dd..461a9a4d7f1 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/ResourceCacheTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/ResourceCacheTest.java
@@ -28,7 +28,7 @@ import static org.junit.Assert.fail;
public class ResourceCacheTest {
@Test
- public void should_cache_resource() throws Exception {
+ public void should_cache_resource() {
ResourceCache cache = new ResourceCache();
String componentKey = "struts:src/org/struts/Action.java";
Resource resource = File.create("org/struts/Action.java").setEffectiveKey(componentKey);
@@ -39,7 +39,7 @@ public class ResourceCacheTest {
}
@Test
- public void should_fail_if_missing_component_key() throws Exception {
+ public void should_fail_if_missing_component_key() {
ResourceCache cache = new ResourceCache();
Resource resource = File.create("org/struts/Action.java").setEffectiveKey(null);
try {