@Test public void comparesTheElementsOfAnObjectArray() { String[] s1 = {"a", "b"}; String[] s2 = {"a", "b"}; String[] s3 = {"c", "d"}; String[] s4 = {"a", "b", "c", "d"}; final Matcher<String[]> matcher = equalTo(s1); assertMatches(matcher, s1); assertMatches(matcher, s2); assertDoesNotMatch(matcher, s3); assertDoesNotMatch(matcher, s4); 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);  }