RichardWarburton / lambda-behave

A modern testing and behavioural specification framework for Java 8
http://richardwarburton.github.io/lambda-behave/
MIT License
253 stars 52 forks source link

Add ability for typesafe hasProperty matcher #54

Closed nico78 closed 10 years ago

nico78 commented 10 years ago

you can currently say:

expect.that(account).hasProperty("balance", is(0))

but it'd be nice if you could do something typesafe like:

expect.that(account)
   .meets(Account::getBalance()).is(5)
  .meets(Account::getName()).is("My Account")