From c43ca904b3325cffef7f7af1bb7e74385a621525 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sun, 16 Apr 2017 06:10:23 +0000 Subject: [PATCH] roll back to hamcrest-core git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791570 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 4 ++-- maven/poi.pom | 2 +- src/testcases/org/apache/poi/POITestCase.java | 17 +++++++++-------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/build.xml b/build.xml index bca71b64b0..3a22a29db4 100644 --- a/build.xml +++ b/build.xml @@ -163,8 +163,8 @@ under the License. - - + + diff --git a/maven/poi.pom b/maven/poi.pom index c1719159a6..efd24cfe0b 100644 --- a/maven/poi.pom +++ b/maven/poi.pom @@ -81,7 +81,7 @@ org.hamcrest - hamcrest-all + hamcrest-core test 1.3 diff --git a/src/testcases/org/apache/poi/POITestCase.java b/src/testcases/org/apache/poi/POITestCase.java index 4545a4d0c3..a82b69abab 100644 --- a/src/testcases/org/apache/poi/POITestCase.java +++ b/src/testcases/org/apache/poi/POITestCase.java @@ -30,10 +30,6 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.startsWith; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.Matchers.lessThan; -import static org.hamcrest.Matchers.lessThanOrEqualTo; -import static org.hamcrest.Matchers.greaterThan; -import static org.hamcrest.Matchers.greaterThanOrEqualTo; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Field; @@ -266,11 +262,16 @@ public final class POITestCase { } public static void assertBetween(String message, int value, int min, int max) { - assertThat(message, value, greaterThanOrEqualTo(min)); - assertThat(message, value, lessThanOrEqualTo(max)); + assertTrue(message + ": " + value + " is less than the minimum value of " + min, + min <= value); + assertTrue(message + ": " + value + " is greater than the maximum value of " + max, + value <= max); } public static void assertStrictlyBetween(String message, int value, int min, int max) { - assertThat(message, value, greaterThan(min)); - assertThat(message, value, lessThan(max)); + assertTrue(message + ": " + value + " is less than or equal to the minimum value of " + min, + min < value); + assertTrue(message + ": " + value + " is greater than or equal to the maximum value of " + max, + value < max); } + }