@Test public void testWhere() throws Exception { final IsPojo<SomeClass> sut = pojo(SomeClass.class) .where("foo", is(42)); assertThat(new SomeClass(), is(sut)); }
public <T> IsPojo<A> where( final String methodName, final Matcher<T> returnValueMatcher) { return where( methodName, self -> { final Method method = methodWithName(methodName, self); method.setAccessible(true); @SuppressWarnings("unchecked") final T returnValue = (T) method.invoke(self); return returnValue; }, returnValueMatcher); }
IsPojo extends TypeSafeDiagnosingMatcher<A> { public <T> IsPojo<A> where( final String methodName, final Matcher<T> returnValueMatcher) { return where( methodName, self -> { final Method method = methodWithName(methodName, self); method.setAccessible(true); @SuppressWarnings("unchecked") final T returnValue = (T) method.invoke(self); return returnValue; }, returnValueMatcher); } }
IsPojo extends TypeSafeDiagnosingMatcher<A> { public <T> IsPojo<A> where( final String methodName, final Matcher<T> returnValueMatcher) { return where( methodName, self -> { final Method method = methodWithName(methodName, self); method.setAccessible(true); @SuppressWarnings("unchecked") final T returnValue = (T) method.invoke(self); return returnValue; }, returnValueMatcher); } IsPojo(); }
IsPojo extends TypeSafeDiagnosingMatcher<A> { public <T> IsPojo<A> where( final String methodName, final Matcher<T> returnValueMatcher) { return where( methodName, self -> { final Method method = methodWithName(methodName, self); method.setAccessible(true); @SuppressWarnings("unchecked") final T returnValue = (T) method.invoke(self); return returnValue; }, returnValueMatcher); } IsPojo(); static IsPojo<A> pojo(final Class<A> cls); IsPojo<A> where(
      final String methodName,
      final Matcher<T> returnValueMatcher); IsPojo<A> where(
      final MethodReference<A, T> methodReference,
      final Matcher<T> returnValueMatcher); IsPojo<A> withProperty(String property, Matcher<?> valueMatcher); @Override void describeTo(Description description); }
IsPojo extends TypeSafeDiagnosingMatcher<A> { public <T> IsPojo<A> where( final String methodName, final Matcher<T> returnValueMatcher) { return where( methodName, self -> { final Method method = methodWithName(methodName, self); method.setAccessible(true); @SuppressWarnings("unchecked") final T returnValue = (T) method.invoke(self); return returnValue; }, returnValueMatcher); } IsPojo(); static IsPojo<A> pojo(final Class<A> cls); IsPojo<A> where(
      final String methodName,
      final Matcher<T> returnValueMatcher); IsPojo<A> where(
      final MethodReference<A, T> methodReference,
      final Matcher<T> returnValueMatcher); IsPojo<A> withProperty(String property, Matcher<?> valueMatcher); @Override void describeTo(Description description);  }