https://github.com/assertj/assertj-assertions-generator
Custom assertions generator
https://github.com/assertj/assertj-assertions-generator
assertj hacktoberfest
Last synced: 9 months ago
JSON representation
Custom assertions generator
- Host: GitHub
- URL: https://github.com/assertj/assertj-assertions-generator
- Owner: assertj
- License: apache-2.0
- Created: 2013-03-14T18:21:52.000Z (almost 13 years ago)
- Default Branch: main
- Last Pushed: 2024-10-17T15:38:09.000Z (about 1 year ago)
- Last Synced: 2024-10-19T11:22:53.382Z (about 1 year ago)
- Topics: assertj, hacktoberfest
- Language: Java
- Homepage: https://joel-costigliola.github.io/assertj/assertj-assertions-generator.html
- Size: 1.19 MB
- Stars: 61
- Watchers: 8
- Forks: 42
- Open Issues: 51
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# AssertJ - Assertions Generator [](https://search.maven.org/search?q=g:%22org.assertj%22%20AND%20a:%22assertj-assertions-generator%22) [](http://www.javadoc.io/doc/org.assertj/assertj-assertions-generator)
[](https://github.com/assertj/assertj-assertions-generator/actions/workflows/main.yml?query=branch%3Amain)
## Overview
The Assertions Generator can create specific assertions for your classes. It comes with :
* a CLI tool (this project)
* a [**maven plugin**](https://github.com/assertj/assertj-assertions-generator-maven-plugin).
* a [**gradle plugin**](https://github.com/assertj/assertj-generator-gradle-plugin).
Let's say you have a `Player` class with `name` and `team` properties. The generator will create a `PlayerAssert` assertions class with `hasName` and `hasTeam` assertions. This allows you to write :
```java
assertThat(mvp).hasName("Lebron James").hasTeam("Miami Heat");
```
## Documentation
Please have a look at the complete documentation in the [**assertions generator section**](http://joel-costigliola.github.io/assertj/assertj-assertions-generator.html), including a [**quickstart guide**](http://joel-costigliola.github.io/assertj/assertj-assertions-generator.html#quickstart).