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