AssertJ

AssertJ 是一个提供易于使用的富类型断言的库。「AssertJ is a library providing easy to use rich typed assertions」

Github星跟踪图

AssertJ - Fluent Assertions for Java Maven Central Javadocs

CI
Cross-Version
Binary Compatibility
Quality Gate Status

Open in Gitpod

AssertJ provides a rich and intuitive set of strongly-typed assertions to use for unit testing (with JUnit, TestNG or any other test framework).

You can ask questions in stackoverflow (assertj tag) and make suggestions by simply creating an issue.

AssertJ's goals

AssertJ's ambition is to provide a rich and intuitive set of strongly-typed assertions for unit testing.

The idea is that disposal assertions should be specific to the type of the objects we are checking when writing unit tests. If you're checking the value of a String, you use String-specific assertions. Checking the value of a Map? Use Map-specific assertions to easily check the contents of the map.

AssertJ's assertions are super easy to use: just type assertThat(underTest). and use code completion to show you all assertions available.

Assertion missing? Please create an issue to discuss it and even better contribute to the project!

AssertJ is composed of several modules:

Want to contribute?

You are encouraged to contribute any missing useful assertions.

Please read the contributing section and raise a PR!

主要指标

概览
名称与所有者assertj/assertj
主编程语言Java
编程语言Java (语言数: 5)
平台
许可证Apache License 2.0
所有者活动
创建于2013-03-14 16:18:49
推送于2025-05-09 21:06:14
最后一次提交
发布数79
最新版本名称assertj-build-4.0.0-M1 (发布于 2025-03-09 23:15:33)
第一版名称assertj-core-1.0.0 (发布于 2013-03-26 09:53:05)
用户参与
星数2.7k
关注者数70
派生数734
提交数5.6k
已启用问题?
问题数1516
打开的问题数206
拉请求数1324
打开的拉请求数64
关闭的拉请求数874
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?