@Test public void testMatch() throws Exception { when(elementMatcher.matches(typeDescription)).thenReturn(true); when(typeDefinition.getSort()).thenReturn(TypeDefinition.Sort.NON_GENERIC); assertThat(new ErasureMatcher<TypeDefinition>(elementMatcher).matches(typeDefinition), is(true)); verify(typeDefinition).asErasure(); verifyNoMoreInteractions(typeDefinition); verify(elementMatcher).matches(typeDescription); verifyNoMoreInteractions(elementMatcher); verifyZeroInteractions(typeDescription); }
public boolean matches(T target) { return matcher.matches(target.asErasure()); }
ErasureMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matcher.matches(target.asErasure()); } }
ErasureMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matcher.matches(target.asErasure()); } ErasureMatcher(ElementMatcher<? super TypeDescription> matcher); }
ErasureMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matcher.matches(target.asErasure()); } ErasureMatcher(ElementMatcher<? super TypeDescription> matcher); boolean matches(T target); @Override String toString(); }
ErasureMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { return matcher.matches(target.asErasure()); } ErasureMatcher(ElementMatcher<? super TypeDescription> matcher); boolean matches(T target); @Override String toString();  }