AssertJ fluent assertions

org.assertj : assertj-core

Rich and fluent assertions for testing for Java

[Website] ·
9k usages
· 2k stars

Add dependency in Maven / Gradle

<dependency>
    <groupId>org.assertj</groupId>
    <artifactId>assertj-core</artifactId>
    <version>3.22.0</version>
</dependency>

How to add dependency in a project

  1. Add dependency to a Maven project
  2. Add dependency to a Gradle project
  3. Add dependency to a SBT Scala project
  4. Add dependency to a Grape project

1. Add dependency to a Maven project

Maven: Add the org.assertj:assertj-core library to the dependencies element of your pom.xml file:

<dependencies>
<dependency>
  <groupId>org.assertj</groupId>
  <artifactId>assertj-core</artifactId>
  <version>3.22.0</version>
</dependency>
</dependencies>

To install org.assertj:assertj-core library use the following command:

mvn install

2. Add dependency to a Gradle project

Gradle Groovy DSL: Add the org.assertj:assertj-core library to the dependencies section of your build.gradle file:

dependencies {
implementation 'org.assertj:assertj-core:3.22.0'
}

Gradle Kotlin DSL: Add the org.assertj:assertj-core library to the dependencies section of your build.gradle.kts file:

dependencies {
implementation("org.assertj:assertj-core:3.22.0")
}

3. Add dependency to a SBT Scala project

Scala: Add the org.assertj:assertj-core library to your build.sbt file:

libraryDependencies += "org.assertj" % "assertj-core" % "3.22.0"

4. Add dependency to a Grape project

Grape: Add an annotation org.assertj:assertj-core library to your groovy script file:

@Grapes(
    @Grab('org.assertj:assertj-core:3.22.0')
)

Compile Dependencies (0)

Group / Artifact Usage

Provided Dependencies (4)

Group / Artifact Usage
junit » junit 63,836
org.hamcrest » hamcrest 1,205
org.junit.jupiter » junit-jupiter-api 7,228
org.opentest4j » opentest4j 95

Test Dependencies (14)