Skip to content

Commit 81f5fe2

Browse files
committed
Collapsed IsArrayContaining...
1 parent f8c2286 commit 81f5fe2

File tree

3 files changed

+2
-42
lines changed

3 files changed

+2
-42
lines changed

hamcrest-library/src/main/java/org/hamcrest/collection/ArrayMatching.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static <E> Matcher<E[]> arrayContainingInAnyOrder(Matcher<? super E>... i
9292
* a list of matchers, each of which must be satisfied by an item provided by an examined array
9393
*/
9494
public static <E> Matcher<E[]> arrayContainingInAnyOrder(Collection<Matcher<? super E>> itemMatchers) {
95-
return isArrayContainingInAnyOrder(itemMatchers);
95+
return new ArrayMatcher<>(new IsIterableContainingInAnyOrder<>(itemMatchers), itemMatchers, "in any order");
9696
}
9797

9898
/**
@@ -171,10 +171,7 @@ public static <E> Matcher<E[]> arrayContaining(Matcher<? super E>... itemMatcher
171171
* a list of matchers, each of which must be satisfied by the corresponding item in an examined array
172172
*/
173173
public static <E> Matcher<E[]> arrayContaining(List<Matcher<? super E>> itemMatchers) {
174-
return new IsArrayContainingInOrder<>(itemMatchers);
174+
return new ArrayMatcher<>(new IsIterableContainingInOrder<>(itemMatchers), itemMatchers, "");
175175
}
176176

177-
private static <E> ArrayMatcher<E> isArrayContainingInAnyOrder(Collection<Matcher<? super E>> matchers) {
178-
return new ArrayMatcher<>(new IsIterableContainingInAnyOrder<>(matchers), matchers, "in any order");
179-
}
180177
}

hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

hamcrest-library/src/test/java/org/hamcrest/collection/IsArrayContainingInOrderTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import org.hamcrest.AbstractMatcherTest;
44
import org.hamcrest.Matcher;
55

6-
import static org.hamcrest.collection.ArrayMatching.arrayContaining;
76
import static org.hamcrest.core.IsEqual.equalTo;
87

98
public class IsArrayContainingInOrderTest extends AbstractMatcherTest {

0 commit comments

Comments
 (0)