reintroduce onProperty feature but named it extracting #29

Closed
joel-costigliola opened this Issue Mar 27, 2013 · 0 comments

Projects

None yet

1 participant

@joel-costigliola
Owner

In FEST 1.x, you would write :

assertThat(fellowshipOfTheRing).onProperty("name").contains("Gandalf", "Frodo", "Legolas");

In AssertJ, it becomes :

// static import of assertThat and extractProperty
import static org.assertj.core.api.Assertions.*;

assertThat(extractProperty("name").from(fellowshipOfTheRing)).contains("Gandalf", "Frodo", "Legolas");

But some may like to use code completion after assertThat, so we reintroduce 'onProperty' but this tie it will be named extracting :

assertThat(fellowshipOfTheRing).extracting("name").contains("Gandalf", "Frodo", "Legolas");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment