java-hamcrest icon indicating copy to clipboard operation
java-hamcrest copied to clipboard

Feature Request: withProperty that takes a lambda

Open Rhobal opened this issue 5 years ago • 0 comments

If withProperty could take a lambda (Function<T, S>) to find the property, it would be type safe, have compile time checking and support code assist and refactoring, e.g.

pojo(Product.class).withProperty(Product::getId, is(1))
   .withProperty(Product::getName, is("name"))

Rhobal avatar Jun 05 '20 07:06 Rhobal