update versions

junit.jupiter and adding assertj-core  dependency for testing
This commit is contained in:
Trobax 2022-11-23 15:41:39 +01:00
parent 9fc3dcb6cf
commit bcaa2d1ef5
2 changed files with 25 additions and 2 deletions

View File

@ -10,6 +10,8 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.6.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.23.1'
}
group = 'com.gildedrose'
@ -17,5 +19,13 @@ version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
test {
// Discover and execute JUnit4-based tests
useJUnit()
// Discover and execute TestNG-based tests
useTestNG()
// Discover and execute JUnit Platform-based (JUnit 5, JUnit Jupiter) tests
// Note that JUnit 5 has the ability to execute JUnit 4 tests as well
useJUnitPlatform()
}

View File

@ -11,19 +11,32 @@
<properties>
<java.version>1.8</java.version>
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<junit.jupiter.version>5.9.0</junit.jupiter.version>
<maven.maven-compiler-plugin.version>3.1</maven.maven-compiler-plugin.version>
<maven.maven-surefire-plugin.version>3.0.0-M4</maven.maven-surefire-plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!--Optional: Supports running Junit4 along with Junit5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.23.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>