I like the way you can write readable unit tests and are supported by the IDE because AssertJ is implemented as a Fluent-API.
In the past weeks I’ve written a package of assertions specially for JavaFX. With this assertions you can verify the values of JavaFX Properties and Bindings.
With the normal AssertJ you would write something like this:
DoubleProperty x = new SimpleDoubleProperty(10.13); ... assertThat(x.get()).isEqualTo(10.13);
With my extensions you don’t need to call the
.get() all the time. Instead you can write:
The project is hosted on github: https://github.com/lestard/assertj-javafx.
I’ve already uploaded it to maven central so you can use it with gradle:
<dependency> <groupId>eu.lestard</groupId> <artifactId>assertj-javafx</artifactId> <version>0.1.0</version> <scope>test</scope> </dependency>
Tell me what you think. If you have ideas for new assertions that could be added feel free to add an issue in the issue tracker.