@Test public void recursivelyTestsElementsOfArrays() { int[][] i1 = new int[][]{{1, 2}, {3, 4}}; int[][] i2 = new int[][]{{1, 2}, {3, 4}}; int[][] i3 = new int[][]{{5, 6}, {7, 8}}; int[][] i4 = new int[][]{{1, 2, 3, 4}, {3, 4}}; final Matcher<int[][]> matcher = equalTo(i1); assertMatches(matcher, i1); assertMatches(matcher, i2); assertDoesNotMatch(matcher, i3); assertDoesNotMatch(matcher, i4); assertDoesNotMatch(matcher, null); }
public static <T> Matcher<T> equalTo(T operand) { return new IsEqual<>(operand); }
IsEqual extends BaseMatcher<T> { public static <T> Matcher<T> equalTo(T operand) { return new IsEqual<>(operand); } }
IsEqual extends BaseMatcher<T> { public static <T> Matcher<T> equalTo(T operand) { return new IsEqual<>(operand); } IsEqual(T equalArg); }
IsEqual extends BaseMatcher<T> { public static <T> Matcher<T> equalTo(T operand) { return new IsEqual<>(operand); } IsEqual(T equalArg); @Override boolean matches(Object actualValue); @Override void describeTo(Description description); static Matcher<T> equalTo(T operand); static Matcher<Object> equalToObject(Object operand); }
IsEqual extends BaseMatcher<T> { public static <T> Matcher<T> equalTo(T operand) { return new IsEqual<>(operand); } IsEqual(T equalArg); @Override boolean matches(Object actualValue); @Override void describeTo(Description description); static Matcher<T> equalTo(T operand); static Matcher<Object> equalToObject(Object operand);  }