Skip to content
joel-costigliola edited this page Mar 27, 2013 · 63 revisions

AssertJ documentation

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.

Latest news

2013-03-13 : Fork from FEST Assert

See New and noteworthy in AssertJ for details or directly release-notes.txt

Getting started

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.

Working with AssertJ

  1. New and noteworthy in AssertJ
  2. Using AssertJ
  3. Extending AssertJ
    1. Using custom conditions
    2. Creating your own specific assertion
  4. Tips and tricks
  5. Learn by examples

AssertJ modules

In addition to java core assertions, AssertJ modules provides assertions for :

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.

Contributing to AssertJ

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.

FEST and AssertJ

AssertJ is a fork of FEST Assert a great project I have contributed to during 3 years, so why having forked it ?
Well the main reason is that FEST 2.0 will only provide a limited set of assertions (even less than FEST 1.x), and I felt on the contrary that it should have provided more assertions.
This is why I forked FEST and created AssertJ : to provide a rich set of assertions, simple and easy to use.

Another difference is that AssertJ will be more open than FEST regarding users demands and contributions, any reasonable request to enrich AssertJ assertions is welcome since 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.

Joel Costigliola (AssertJ creator)

Thanks

AssertJ has its roots in FEST Assert, a project I have contributed on for 3 years, so thanks to Alex Ruiz FEST's creator !

Migration Guides

v3.25 → v4.0

Clone this wiki locally