diff options
Diffstat (limited to 'sonar-server')
5 files changed, 13 insertions, 12 deletions
diff --git a/sonar-server/pom.xml b/sonar-server/pom.xml index 2f57f5d078d..67877dc5a99 100644 --- a/sonar-server/pom.xml +++ b/sonar-server/pom.xml @@ -177,7 +177,12 @@ </dependency> <dependency> <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-all</artifactId> <scope>test</scope> </dependency> <dependency> @@ -196,11 +201,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>xmlunit</groupId> <artifactId>xmlunit</artifactId> <scope>test</scope> diff --git a/sonar-server/src/test/java/org/sonar/server/platform/ClassLoaderUtilsTest.java b/sonar-server/src/test/java/org/sonar/server/platform/ClassLoaderUtilsTest.java index 8d1038d9e9e..6842259d5ad 100644 --- a/sonar-server/src/test/java/org/sonar/server/platform/ClassLoaderUtilsTest.java +++ b/sonar-server/src/test/java/org/sonar/server/platform/ClassLoaderUtilsTest.java @@ -34,6 +34,7 @@ import org.junit.rules.TemporaryFolder; import javax.annotation.Nullable; import java.io.File; +import java.io.IOException; import java.net.URL; import java.net.URLClassLoader; import java.util.Collection; @@ -96,7 +97,7 @@ public class ClassLoaderUtilsTest { } @Test - public void copyRubyRailsApp() { + public void copyRubyRailsApp() throws IOException { File toDir = temp.newFolder("dest"); ClassLoaderUtils.copyResources(classLoader, "org/sonar/sqale", toDir, Functions.<String>identity()); @@ -106,7 +107,7 @@ public class ClassLoaderUtilsTest { } @Test - public void copyRubyRailsApp_relocate_files() { + public void copyRubyRailsApp_relocate_files() throws IOException { File toDir = temp.newFolder("dest"); ClassLoaderUtils.copyResources(classLoader, "org/sonar/sqale", toDir, new Function<String, String>() { public String apply(@Nullable String path) { diff --git a/sonar-server/src/test/java/org/sonar/server/platform/RailsAppsDeployerTest.java b/sonar-server/src/test/java/org/sonar/server/platform/RailsAppsDeployerTest.java index daec51fbd2f..be9c53e4d24 100644 --- a/sonar-server/src/test/java/org/sonar/server/platform/RailsAppsDeployerTest.java +++ b/sonar-server/src/test/java/org/sonar/server/platform/RailsAppsDeployerTest.java @@ -32,7 +32,7 @@ import java.net.URL; import java.net.URLClassLoader; import java.util.Collections; -import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; diff --git a/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java b/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java index 08bd6360789..4ac7c640fc1 100644 --- a/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java +++ b/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java @@ -28,7 +28,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; import static org.fest.assertions.Assertions.assertThat; -import static org.hamcrest.text.StringStartsWith.startsWith; +import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.assertThat; public class ServerIdGeneratorTest { diff --git a/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java b/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java index b5875e781b6..4bff9fb717f 100644 --- a/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java +++ b/sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java @@ -38,9 +38,9 @@ import java.util.List; import static com.google.common.collect.Iterables.getOnlyElement; import static org.fest.assertions.Assertions.assertThat; -import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.lessThan; -import static org.hamcrest.number.OrderingComparisons.greaterThan; +import static org.hamcrest.Matchers.greaterThan; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertThat; |