Remove dependency on JUnit 4
Closes gh-1879
This commit is contained in:
@@ -10,7 +10,9 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
|
||||
integrationTestCompile 'org.springframework:spring-core:4.3.7.RELEASE'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||
integrationTestCompile 'org.springframework:spring-core:4.3.7.RELEASE'
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package sample;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.core.Ordered;
|
||||
|
||||
public class TheTest {
|
||||
|
||||
@@ -10,5 +10,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
optional 'javax.servlet:javax.servlet-api:3.1.0'
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package sample;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class TheTest {
|
||||
|
||||
@@ -9,5 +9,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package sample;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class TheClassTest {
|
||||
TheClass theClass = new TheClass();
|
||||
|
||||
@Test
|
||||
public void doStuffWhenTrueThenTrue() {
|
||||
assertTrue(theClass.doStuff(true));
|
||||
assertThat(theClass.doStuff(true)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void doStuffWhenTrueThenFalse() {
|
||||
assertFalse(theClass.doStuff(false));
|
||||
assertThat(theClass.doStuff(false)).isFalse();
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||
compile 'org.springframework:spring-core'
|
||||
}
|
||||
@@ -9,6 +9,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||
optional 'aopalliance:aopalliance:1.0'
|
||||
}
|
||||
@@ -11,6 +11,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||
optional 'aopalliance:aopalliance:1.0'
|
||||
}
|
||||
@@ -7,7 +7,9 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile 'junit:junit:4.12'
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||
optional 'aopalliance:aopalliance:1.0'
|
||||
}
|
||||
|
||||
|
||||
@@ -6,5 +6,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testImplementation project(path: ':core', configuration: 'tests')
|
||||
testImplementation 'junit:junit:4.12'
|
||||
}
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package sample;
|
||||
|
||||
import org.junit.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class DependencyTest {
|
||||
@Test
|
||||
|
||||
@@ -27,7 +27,6 @@ dependencyManagement {
|
||||
dependency 'io.lettuce:lettuce-core:6.1.5.RELEASE'
|
||||
dependency 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
dependency 'javax.servlet:javax.servlet-api:4.0.1'
|
||||
dependency 'junit:junit:4.13.2'
|
||||
dependency 'mysql:mysql-connector-java:8.0.26'
|
||||
dependency 'org.apache.derby:derby:10.14.2.0'
|
||||
dependency 'org.assertj:assertj-core:3.21.0'
|
||||
|
||||
Reference in New Issue
Block a user