Skip to content

Commit

Permalink
Upgrade hamcrest from 1.3 to 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sikeoka authored and aaime committed Aug 20, 2024
1 parent 111dcc7 commit 0d2fc0b
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 140 deletions.
10 changes: 0 additions & 10 deletions geowebcache/arcgiscache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,11 @@
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions geowebcache/azureblob/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand All @@ -51,11 +46,6 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
Expand Down
15 changes: 0 additions & 15 deletions geowebcache/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,21 +180,6 @@
<artifactId>httpclient</artifactId>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-integration</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.emptyString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.isEmptyString;

import java.util.Collections;
import java.util.Map;
Expand All @@ -35,7 +35,7 @@ public class ParametersUtilsTest {
@Test
public void testEmptyToKVP() {
String result = ParametersUtils.getKvp(Collections.emptyMap());
assertThat(result, isEmptyString());
assertThat(result, emptyString());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
import java.util.Map;
import java.util.Set;
import org.easymock.EasyMock;
import org.easymock.IArgumentMatcher;
import org.geowebcache.grid.BoundingBox;
import org.geowebcache.grid.GridSubset;
import org.geowebcache.layer.TileLayer;
import org.geowebcache.mime.ImageMime;
import org.geowebcache.storage.StorageBroker;
import org.hamcrest.integration.EasyMock2Adapter;
import org.hamcrest.Matcher;
import org.hamcrest.StringDescription;
import org.junit.Test;

public class TruncateBboxRequestTest {
Expand All @@ -47,7 +49,7 @@ protected SeedRequest seedRequest(
int maxZ,
BoundingBox bounds,
Map<String, String> parameters) {
EasyMock2Adapter.adapt(
Matcher<Object> matcher =
allOf(
hasProperty("layerName", equalTo(layerName)),
hasProperty("gridSetId", equalTo(gridSet)),
Expand All @@ -58,7 +60,20 @@ protected SeedRequest seedRequest(
hasProperty("filterUpdate", any(Boolean.class)),
hasProperty("threadCount", any(Integer.class)),
hasProperty("bounds", equalTo(bounds)),
hasProperty("type", any(GWCTask.TYPE.class))));
hasProperty("type", any(GWCTask.TYPE.class)));
EasyMock.reportMatcher(
new IArgumentMatcher() {

@Override
public boolean matches(Object argument) {
return matcher.matches(argument);
}

@Override
public void appendTo(StringBuffer buffer) {
matcher.describeTo(new StringDescription(buffer));
}
});
return null;
}

Expand Down
10 changes: 0 additions & 10 deletions geowebcache/diskquota/bdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
Expand All @@ -46,11 +41,6 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions geowebcache/diskquota/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
Expand All @@ -58,11 +53,6 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions geowebcache/mbtiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,11 @@
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
Expand Down
35 changes: 31 additions & 4 deletions geowebcache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<commons-text.version>1.12.0</commons-text.version>
<commons-fileupload.version>1.5</commons-fileupload.version>
<guava.version>33.2.1-jre</guava.version>
<hamcrest.version>3.0</hamcrest.version>
<jsr305.version>3.0.1</jsr305.version>
<log4j.version>2.17.2</log4j.version>
<h2.version>1.1.119</h2.version>
Expand Down Expand Up @@ -273,17 +274,29 @@
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<artifactId>hamcrest</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-integration</artifactId>
<version>1.3</version>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -470,6 +483,20 @@
</dependencies>
</dependencyManagement>

<!-- common test dependencies -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<repositories>
<repository>
<releases>
Expand Down
10 changes: 0 additions & 10 deletions geowebcache/rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geowebcache</groupId>
<artifactId>gwc-core</artifactId>
Expand All @@ -57,11 +52,6 @@
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions geowebcache/s3storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand All @@ -53,11 +48,6 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.findify</groupId>
<artifactId>s3mock_2.12</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions geowebcache/sqlite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions geowebcache/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
Expand All @@ -133,11 +128,6 @@
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-legacy</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions geowebcache/wms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand All @@ -67,11 +62,6 @@
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geowebcache</groupId>
<artifactId>gwc-core</artifactId>
Expand Down
Loading

0 comments on commit 0d2fc0b

Please sign in to comment.