@Test @SuppressWarnings("unchecked") public void testStringRepresentation() throws Exception { assertThat(new CollectionOneToOneMatcher<Object>(Arrays.asList(firstMatcher, secondMatcher)).toString(), is(startsWith + "(" + firstMatcher + ", " + secondMatcher + ")")); }
@Override public String toString() { StringBuilder stringBuilder = new StringBuilder("containing("); boolean first = true; for (Object value : matchers) { if (first) { first = false; } else { stringBuilder.append(", "); } stringBuilder.append(value); } return stringBuilder.append(')').toString(); }
CollectionOneToOneMatcher extends ElementMatcher.Junction.AbstractBase<Iterable<? extends T>> { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder("containing("); boolean first = true; for (Object value : matchers) { if (first) { first = false; } else { stringBuilder.append(", "); } stringBuilder.append(value); } return stringBuilder.append(')').toString(); } }
CollectionOneToOneMatcher extends ElementMatcher.Junction.AbstractBase<Iterable<? extends T>> { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder("containing("); boolean first = true; for (Object value : matchers) { if (first) { first = false; } else { stringBuilder.append(", "); } stringBuilder.append(value); } return stringBuilder.append(')').toString(); } CollectionOneToOneMatcher(List<? extends ElementMatcher<? super T>> matchers); }
CollectionOneToOneMatcher extends ElementMatcher.Junction.AbstractBase<Iterable<? extends T>> { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder("containing("); boolean first = true; for (Object value : matchers) { if (first) { first = false; } else { stringBuilder.append(", "); } stringBuilder.append(value); } return stringBuilder.append(')').toString(); } CollectionOneToOneMatcher(List<? extends ElementMatcher<? super T>> matchers); boolean matches(Iterable<? extends T> target); @Override String toString(); }
CollectionOneToOneMatcher extends ElementMatcher.Junction.AbstractBase<Iterable<? extends T>> { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder("containing("); boolean first = true; for (Object value : matchers) { if (first) { first = false; } else { stringBuilder.append(", "); } stringBuilder.append(value); } return stringBuilder.append(')').toString(); } CollectionOneToOneMatcher(List<? extends ElementMatcher<? super T>> matchers); boolean matches(Iterable<? extends T> target); @Override String toString();  }