-
-
Notifications
You must be signed in to change notification settings - Fork 683
Home
AssertJ is a Java library that provides a fluent interface for writing assertions. Its main goal is to improve test code readability and make maintenance of tests easier.
AssertJ requires Java SE 6.0 or later and can be used with either JUnit or TestNG.
- 2013-04-15 : AssertJ core 1.1.0 release
- 2013-03-26 : AssertJ first train release (core, guava, joda-time and assertions generator)
- 2013-03-13 : Fork from FEST Assert
See New and noteworthy in AssertJ for details.
Quick start : just have a look at our One minute starting guide!
Replace JUnit assertions by AssertJ assertions : we have a guide to easily convert JUnit assertions to AssertJ, check this page (note also that we plan to write an eclipse plugin to do this conversion task).
If you were using FEST 1.4, have a look at our migration guide, but don't worry, migration is not hard.
If you have any questions, please use AssertJ google group.
- New and noteworthy in AssertJ
- Using AssertJ
- Extending AssertJ
- Tips and tricks
- Learn by examples
In addition to java core assertions, AssertJ modules provides assertions for :
- Joda Time : see AssertJ assertions for Joda Time
- Guava : see AssertJ assertions for Guava
Although AssertJ core can be used with Android, I suggest to use Fest assertions for Android (provided by Square), it's not an AssertJ module but it is very useful.
AssertJ is a fork of FEST Assert a great project I have contributed to during 3 years, so why having forked it ?
Well there are two main reasons :
- FEST 2.0 will only provide a limited set of assertions, far less than Fest 2.0M10 and even less than FEST 1.x.
- FEST is not enough open to users demands and contributions.
On the contrary AssertJ goal is to provide a rich set of assertions and any resonable requests to enrich AssertJ assertions is welcome as we know it will be useful to someone. Said otherwise, AssertJ is community driven, we listen to our users because AssertJ is built for them.
If you feel that some assertion is missing, please fill a ticket or even better make a contribution !
Joel Costigliola (AssertJ creator)
You can ask questions and make suggestions on AssertJ google group.
You are very welcome to contribute, we really want to offer the richer and easy to use assertions API, so ideas from our users are very appreciated.
Contributing is easy and we try to help people contributing, have a look at the contributor guidelines.
AssertJ has its roots in FEST Assert, a project I have contributed on for 3 years, so thanks to Alex Ruiz FEST's creator !