aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-20 00:43:47 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-20 00:45:34 +0200
commit2f779df51e9da5b07ad6f837fe1c98eab9fbf439 (patch)
treed2be9202eb947ecb005c72368bbcb4f1b86e8e68 /sonar-batch
parent24ec2501f751dc2a122f1e5f905ee4151ec8b891 (diff)
downloadsonarqube-2f779df51e9da5b07ad6f837fe1c98eab9fbf439.tar.gz
sonarqube-2f779df51e9da5b07ad6f837fe1c98eab9fbf439.zip
Upgrade hamcrest and fix conflicts with JUnit and Mockito
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/pom.xml13
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java4
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java4
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/maven/DefaultMavenPluginExecutorTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializerTest.java6
10 files changed, 17 insertions, 22 deletions
diff --git a/sonar-batch/pom.xml b/sonar-batch/pom.xml
index db45a80e535..dbd2cc91a69 100644
--- a/sonar-batch/pom.xml
+++ b/sonar-batch/pom.xml
@@ -116,18 +116,13 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
+ <groupId>org.codehaus.sonar</groupId>
+ <artifactId>sonar-testing-harness</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java
index 55518ac42d2..368dba8268f 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionDictionnaryTest.java
@@ -33,7 +33,7 @@ import java.util.Collection;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
-import static org.junit.internal.matchers.IsCollectionContaining.hasItem;
+import static org.hamcrest.Matchers.hasItem;
import static org.mockito.Mockito.mock;
public class BatchExtensionDictionnaryTest {
diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java
index 3ab8458a7a5..4be6293c27a 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java
@@ -27,10 +27,10 @@ import org.sonar.jpa.test.AbstractDbUnitTestCase;
import java.util.Arrays;
import java.util.List;
-import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.nullValue;
-import static org.junit.internal.matchers.IsCollectionContaining.hasItems;
+import static org.hamcrest.Matchers.hasItems;
public class PastMeasuresLoaderTest extends AbstractDbUnitTestCase {
diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java
index 7423f21a458..7abd043f62b 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java
@@ -27,7 +27,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
-import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
public class PastSnapshotFinderByDateTest extends AbstractDbUnitTestCase {
diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java
index d9a9809ba07..096a3d6180b 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java
@@ -31,7 +31,7 @@ import java.util.Collections;
import java.util.Date;
import java.util.List;
-import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertThat;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java
index f8ea4da83ba..a2c0d82e301 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java
@@ -23,7 +23,7 @@ import org.junit.Test;
import org.sonar.api.database.model.Snapshot;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
-import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.is;
import static org.hamcrest.core.IsNull.nullValue;
import static org.junit.Assert.assertThat;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java
index cb20f15cde6..51a9c0269c9 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java
@@ -24,12 +24,12 @@ import org.sonar.api.measures.Metric;
import org.sonar.api.resources.Directory;
import org.sonar.api.resources.File;
-import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.is;
import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
-import static org.junit.internal.matchers.IsCollectionContaining.hasItem;
+import static org.hamcrest.Matchers.hasItem;
public class BucketTest {
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
index c4c7dfd4093..e08774d96c1 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
@@ -36,7 +36,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import static org.fest.assertions.Assertions.assertThat;
-import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.notNullValue;
import static org.mockito.Mockito.mock;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/maven/DefaultMavenPluginExecutorTest.java b/sonar-batch/src/test/java/org/sonar/batch/maven/DefaultMavenPluginExecutorTest.java
index 75897a2abb3..3b1de1e4956 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/maven/DefaultMavenPluginExecutorTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/maven/DefaultMavenPluginExecutorTest.java
@@ -28,7 +28,7 @@ import org.sonar.batch.scan.filesystem.DefaultModuleFileSystem;
import java.io.File;
-import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyList;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializerTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializerTest.java
index 36b396ff437..21e6203d565 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializerTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializerTest.java
@@ -21,7 +21,7 @@ package org.sonar.batch.scan.filesystem;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
-import org.junit.ClassRule;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
@@ -36,8 +36,8 @@ import static org.mockito.Mockito.mock;
public class ModuleFileSystemInitializerTest {
- @ClassRule
- public static TemporaryFolder temp = new TemporaryFolder();
+ @Rule
+ public TemporaryFolder temp = new TemporaryFolder();
PathResolver pathResolver = new PathResolver();