aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-dbcleaner-plugin
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 /plugins/sonar-dbcleaner-plugin
parent24ec2501f751dc2a122f1e5f905ee4151ec8b891 (diff)
downloadsonarqube-2f779df51e9da5b07ad6f837fe1c98eab9fbf439.tar.gz
sonarqube-2f779df51e9da5b07ad6f837fe1c98eab9fbf439.zip
Upgrade hamcrest and fix conflicts with JUnit and Mockito
Diffstat (limited to 'plugins/sonar-dbcleaner-plugin')
-rw-r--r--plugins/sonar-dbcleaner-plugin/pom.xml7
-rw-r--r--plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DeleteAllFilterTest.java2
-rw-r--r--plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneFilterTest.java6
3 files changed, 10 insertions, 5 deletions
diff --git a/plugins/sonar-dbcleaner-plugin/pom.xml b/plugins/sonar-dbcleaner-plugin/pom.xml
index 38388e21c4d..23d11cd36f0 100644
--- a/plugins/sonar-dbcleaner-plugin/pom.xml
+++ b/plugins/sonar-dbcleaner-plugin/pom.xml
@@ -47,6 +47,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-all</artifactId>
+ <scope>test</scope>
+ </dependency>
<!-- TODO http://jira.codehaus.org/browse/SONAR-2011
We need following dependency, otherwise we will receive
@@ -60,7 +65,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DeleteAllFilterTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DeleteAllFilterTest.java
index 744c88cccef..5367c3675b8 100644
--- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DeleteAllFilterTest.java
+++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DeleteAllFilterTest.java
@@ -29,7 +29,7 @@ import java.util.List;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
-import static org.junit.internal.matchers.IsCollectionContaining.hasItem;
+import static org.hamcrest.Matchers.hasItem;
public class DeleteAllFilterTest {
diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneFilterTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneFilterTest.java
index e9faa55c7b9..cd1624644a5 100644
--- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneFilterTest.java
+++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneFilterTest.java
@@ -19,8 +19,8 @@
*/
package org.sonar.plugins.dbcleaner.period;
+import org.hamcrest.core.IsCollectionContaining;
import org.junit.Test;
-import org.junit.internal.matchers.IsCollectionContaining;
import org.sonar.api.utils.DateUtils;
import org.sonar.core.purge.PurgeableSnapshotDto;
import org.sonar.plugins.dbcleaner.DbCleanerTestUtils;
@@ -46,7 +46,7 @@ public class KeepOneFilterTest {
createSnapshotWithDate(4L, "2011-05-19"), // may -> to be deleted
createSnapshotWithDate(5L, "2011-06-01"), // june -> keep
createSnapshotWithDate(6L, "2012-01-01") // out of scope -> keep
- ));
+ ));
assertThat(toDelete.size(), is(2));
assertThat(toDelete, IsCollectionContaining.hasItem(new DbCleanerTestUtils.SnapshotMatcher(3L)));
@@ -62,7 +62,7 @@ public class KeepOneFilterTest {
createSnapshotWithDate(2L, "2011-05-02").setLast(true),
createSnapshotWithDate(3L, "2011-05-19").setHasEvents(true).setLast(false),
createSnapshotWithDate(4L, "2011-05-23") // to be deleted
- ));
+ ));
assertThat(toDelete.size(), is(2));
assertThat(toDelete, IsCollectionContaining.hasItem(new DbCleanerTestUtils.SnapshotMatcher(1L)));