java-hamcrest
java-hamcrest copied to clipboard
Feature Request: withProperty that takes a lambda
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"))