The Assertion Generator is able to create assertions specific to your own classes, it comes with :
- a CLI tool (this project) and a maven plugin.
Let's say that you have a Player
class with name
and team
properties, the generator is able to create a PlayerAssert
assertions class with hasName
and hasTeam
assertions, to write code like :
assertThat(mvp).hasName("Lebron James").hasTeam("Miami Heat");
Please have a look at the complete documentation in assertj.org assertions generator section, including a quickstart guide.