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 9ab66a2 Simplify Assertions (#205)
9ab66a2 is described below
commit 9ab66a22c30fd3949c9074075bfa54038c2a1500
Author: Arturo Bernal <[email protected]>
AuthorDate: Sat Jul 3 00:46:22 2021 +0200
Simplify Assertions (#205)
---
.../commons/compress/archivers/zip/ZipEightByteIntegerTest.java | 7 ++++---
.../org/apache/commons/compress/archivers/zip/ZipLongTest.java | 7 ++++---
.../org/apache/commons/compress/archivers/zip/ZipShortTest.java | 7 ++++---
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git
a/src/test/java/org/apache/commons/compress/archivers/zip/ZipEightByteIntegerTest.java
b/src/test/java/org/apache/commons/compress/archivers/zip/ZipEightByteIntegerTest.java
index c595ccc..9f2506a 100644
---
a/src/test/java/org/apache/commons/compress/archivers/zip/ZipEightByteIntegerTest.java
+++
b/src/test/java/org/apache/commons/compress/archivers/zip/ZipEightByteIntegerTest.java
@@ -20,6 +20,7 @@ package org.apache.commons.compress.archivers.zip;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
import java.math.BigInteger;
@@ -103,12 +104,12 @@ public class ZipEightByteIntegerTest {
assertEquals("reflexive", zl, zl);
assertEquals("works", zl, zl2);
- assertFalse("works, part two", zl.equals(zl3));
+ assertNotEquals("works, part two", zl, zl3);
assertEquals("symmetric", zl2, zl);
- assertFalse("null handling", zl.equals(null));
- assertFalse("non ZipEightByteInteger handling", zl.equals(new
Integer(0x1234)));
+ assertNotEquals("null handling", null, zl);
+ assertNotEquals("non ZipEightByteInteger handling", zl, new
Integer(0x1234));
}
/**
diff --git
a/src/test/java/org/apache/commons/compress/archivers/zip/ZipLongTest.java
b/src/test/java/org/apache/commons/compress/archivers/zip/ZipLongTest.java
index 6e52997..f1d11ee 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipLongTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipLongTest.java
@@ -22,6 +22,7 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotSame;
/**
@@ -79,12 +80,12 @@ public class ZipLongTest {
assertEquals("reflexive", zl, zl);
assertEquals("works", zl, zl2);
- assertFalse("works, part two", zl.equals(zl3));
+ assertNotEquals("works, part two", zl, zl3);
assertEquals("symmetric", zl2, zl);
- assertFalse("null handling", zl.equals(null));
- assertFalse("non ZipLong handling", zl.equals(new Integer(0x1234)));
+ assertNotEquals("null handling", null, zl);
+ assertNotEquals("non ZipLong handling", zl, new Integer(0x1234));
}
/**
diff --git
a/src/test/java/org/apache/commons/compress/archivers/zip/ZipShortTest.java
b/src/test/java/org/apache/commons/compress/archivers/zip/ZipShortTest.java
index a55ae9e..d647670 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipShortTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipShortTest.java
@@ -20,6 +20,7 @@ package org.apache.commons.compress.archivers.zip;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotSame;
import org.junit.Test;
@@ -77,12 +78,12 @@ public class ZipShortTest {
assertEquals("reflexive", zs, zs);
assertEquals("works", zs, zs2);
- assertFalse("works, part two", zs.equals(zs3));
+ assertNotEquals("works, part two", zs, zs3);
assertEquals("symmetric", zs2, zs);
- assertFalse("null handling", zs.equals(null));
- assertFalse("non ZipShort handling", zs.equals(new Integer(0x1234)));
+ assertNotEquals("null handling", null, zs);
+ assertNotEquals("non ZipShort handling", zs, new Integer(0x1234));
}
/**