aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/junit/Assume.java
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2017-01-23 14:41:00 +0000
committerPaul Duffin <paulduffin@google.com>2017-01-23 15:34:33 +0000
commitfacdecc8e055d722b8c0e0c8fbf8a8644e7fec57 (patch)
tree9930cc8a22092529188aaa026b3af0681c8c3023 /src/main/java/org/junit/Assume.java
parent7323bf635ef4f8c3d3f40e4ee1e4c50652e782c8 (diff)
downloadjunit-facdecc8e055d722b8c0e0c8fbf8a8644e7fec57.tar.gz
Revert "Revert matchers back to 4.10 to compile against Hamcrest 1.1"
This reverts commit 86f323b2a73c9c250fbe25b828435aa936704ab3. Bug: 30946317 Test: make checkbuild Change-Id: Ie72fec656d01f24a1724d33a35ceecdb57aaba57
Diffstat (limited to 'src/main/java/org/junit/Assume.java')
-rw-r--r--src/main/java/org/junit/Assume.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/org/junit/Assume.java b/src/main/java/org/junit/Assume.java
index c96ff99..b7687f7 100644
--- a/src/main/java/org/junit/Assume.java
+++ b/src/main/java/org/junit/Assume.java
@@ -1,12 +1,12 @@
package org.junit;
import static java.util.Arrays.asList;
+import static org.hamcrest.CoreMatchers.everyItem;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
import org.hamcrest.Matcher;
-import org.junit.internal.matchers.Each;
/**
* A set of methods useful for stating assumptions about the conditions in which a test is meaningful.
@@ -66,13 +66,12 @@ public class Assume {
assumeTrue(message, !b);
}
- /**
- * If called with one or more null elements in <code>objects</code>, the test will halt and be ignored.
- * @param objects
- */
- public static void assumeNotNull(Object... objects) {
- assumeThat(asList(objects), Each.each(notNullValue()));
- }
+ /**
+ * If called with one or more null elements in <code>objects</code>, the test will halt and be ignored.
+ */
+ public static void assumeNotNull(Object... objects) {
+ assumeThat(asList(objects), everyItem(notNullValue()));
+ }
/**
* Call to assume that <code>actual</code> satisfies the condition specified by <code>matcher</code>.