junit-closure
The JUnit Jupiter and Platform test dependencies, selected together as one.
A shared dependency selection for JUnit Jupiter tests and the JUnit Platform.
Key Concepts
Use
Role. Select JunitClosure at Testing scope when tests use JUnit directly. The module exposes the Jupiter API, engine and parameterized tests, plus Platform discovery, launching and test-kit APIs through transitive requirements.
Usage
In a catalog realization’s dependency list
@Dependency(value = {JunitClosure.class}, scope = Testing.class)
A Jupiter test
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class SumTest {
@Test
void addsTwoIntegers() {
assertEquals(5, Integer.sum(2, 3));
}
}
Dependencies
org.junit.jupiter:junit-jupiter-api:6.1.3at Compileorg.junit.jupiter:junit-jupiter-engine:6.1.3at Compileorg.junit.jupiter:junit-jupiter-params:6.1.3at Compileorg.junit.platform:junit-platform-commons:6.1.3at Compileorg.junit.platform:junit-platform-engine:6.1.3at Compileorg.junit.platform:junit-platform-launcher:6.1.3at Compileorg.junit.platform:junit-platform-testkit:6.1.3at Compileorg.opentest4j:opentest4j:1.3.0at Compileorg.jspecify:jspecify:1.0.0at Compileorg.apiguardian:apiguardian-api:1.1.2at Compileorg.assertj:assertj-core:3.27.7at Compile
Views
Drawn from the release. A link in a view opens its source at the release tag.