You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/11/01 15:40:01 UTC

[commons-compress] branch master updated: Update Mockito 1.10.19 -> 3.6.0.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new bf2fbb6  Update Mockito 1.10.19 -> 3.6.0.
bf2fbb6 is described below

commit bf2fbb6f0b3185000eab77bb54ff29c2beaa064d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 1 10:39:57 2020 -0500

    Update Mockito 1.10.19 -> 3.6.0.
---
 pom.xml                                                           | 8 +++++++-
 src/changes/changes.xml                                           | 3 +++
 .../commons/compress/utils/FixedLengthBlockOutputStreamTest.java  | 6 ++++--
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 885fef9..8cae066 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,7 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj.
     <commons.rc.version>RC1</commons.rc.version>
     <!-- old version used by japicmp -->
     <commons.bc.version>1.20</commons.bc.version>
-    <mockito.version>1.10.19</mockito.version>
+    <mockito.version>3.6.0</mockito.version>
     <commons.pmd-plugin.version>3.13.0</commons.pmd-plugin.version>
 
     <commons.manifestlocation>${project.build.outputDirectory}/META-INF</commons.manifestlocation>
@@ -87,6 +87,12 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj.
 
   <dependencies>
     <dependency>
+      <groupId>org.hamcrest</groupId>
+      <artifactId>hamcrest</artifactId>
+      <version>2.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>4.13.1</version>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index e9ad17c..65491da 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -254,6 +254,9 @@ The <action> type attribute can be add,update,fix,remove.
       <action type="update" date="2020-11-01" due-to="Dependabot" dev="ggregory">
         Bump memoryfilesystem from 1.3.0 to 2.1.0 #131.
       </action>
+      <action type="update" date="2020-11-01" due-to="Gary Gregory" dev="ggregory">
+        Update Mockito 1.10.19 -> 3.6.0.
+      </action>
     </release>
     <release version="1.20" date="2020-02-08"
              description="Release 1.20 (Java 7)">
diff --git a/src/test/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStreamTest.java b/src/test/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStreamTest.java
index 5c01580..9f1dd67 100644
--- a/src/test/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStreamTest.java
@@ -18,9 +18,10 @@
  */
 package org.apache.commons.compress.utils;
 
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.greaterThanOrEqualTo;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -37,6 +38,7 @@ import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.concurrent.atomic.AtomicBoolean;
+
 import org.hamcrest.core.IsInstanceOf;
 import org.junit.Test;
 import org.mockito.internal.matchers.GreaterOrEqual;
@@ -294,7 +296,7 @@ public class FixedLengthBlockOutputStreamTest {
 
     private static void assertContainsAtOffset(final String msg, final byte[] expected, final int offset,
         final byte[] actual) {
-        assertThat(actual.length, new GreaterOrEqual<>(offset + expected.length));
+        assertThat(actual.length, greaterThanOrEqualTo(offset + expected.length));
         for (int i = 0; i < expected.length; i++) {
             assertEquals(String.format("%s ([%d])", msg, i), expected[i], actual[i + offset]);
         }