@Test public void testNoMatch() throws Exception { assertThat(new CollectionErasureMatcher<Iterable<TypeDefinition>>(matcher).matches(Arrays.asList(first, second)), is(false)); verify(matcher).matches(Arrays.asList(firstRaw, secondRaw)); verifyNoMoreInteractions(matcher); verify(first).asErasure(); verifyNoMoreInteractions(first); verify(second).asErasure(); verifyNoMoreInteractions(second); }
public boolean matches(T target) { List<TypeDescription> typeDescriptions = new ArrayList<TypeDescription>(); for (TypeDefinition typeDefinition : target) { typeDescriptions.add(typeDefinition.asErasure()); } return matcher.matches(typeDescriptions); }
CollectionErasureMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { List<TypeDescription> typeDescriptions = new ArrayList<TypeDescription>(); for (TypeDefinition typeDefinition : target) { typeDescriptions.add(typeDefinition.asErasure()); } return matcher.matches(typeDescriptions); } }
CollectionErasureMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { List<TypeDescription> typeDescriptions = new ArrayList<TypeDescription>(); for (TypeDefinition typeDefinition : target) { typeDescriptions.add(typeDefinition.asErasure()); } return matcher.matches(typeDescriptions); } CollectionErasureMatcher(ElementMatcher<? super Iterable<? extends TypeDescription>> matcher); }
CollectionErasureMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { List<TypeDescription> typeDescriptions = new ArrayList<TypeDescription>(); for (TypeDefinition typeDefinition : target) { typeDescriptions.add(typeDefinition.asErasure()); } return matcher.matches(typeDescriptions); } CollectionErasureMatcher(ElementMatcher<? super Iterable<? extends TypeDescription>> matcher); boolean matches(T target); @Override String toString(); }
CollectionErasureMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { List<TypeDescription> typeDescriptions = new ArrayList<TypeDescription>(); for (TypeDefinition typeDefinition : target) { typeDescriptions.add(typeDefinition.asErasure()); } return matcher.matches(typeDescriptions); } CollectionErasureMatcher(ElementMatcher<? super Iterable<? extends TypeDescription>> matcher); boolean matches(T target); @Override String toString();  }