The commit deprecates syncBody(Object) in favor of body(Object) which has the same behavior in ServerResponse, WebClient and WebTestClient. It also adds body(Object, Class) and body(Object, ParameterizedTypeReference) methods in order to support any reactive type that can be adapted to a Publisher via ReactiveAdapterRegistry. Related BodyInserters#fromProducer methods are provided as well. Shadowed Kotlin body<T>() extensions are deprecated in favor of bodyWithType<T>() ones, including dedicated Publisher<T> and Flow<T> variants. Coroutines extensions are adapted as well, and body(Object) can now be used with suspending functions. Closes gh-23212
131 lines
5.2 KiB
Groovy
131 lines
5.2 KiB
Groovy
description = "Spring TestContext Framework"
|
|
|
|
dependencyManagement {
|
|
imports {
|
|
mavenBom "org.junit:junit-bom:${junit5Version}"
|
|
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
|
mavenBom "io.netty:netty-bom:${nettyVersion}"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile(project(":spring-core"))
|
|
optional(project(":spring-aop"))
|
|
optional(project(":spring-beans"))
|
|
optional(project(":spring-context"))
|
|
optional(project(":spring-jdbc"))
|
|
optional(project(":spring-orm"))
|
|
optional(project(":spring-tx"))
|
|
optional(project(":spring-web"))
|
|
optional(project(":spring-webflux"))
|
|
optional(project(":spring-webmvc"))
|
|
optional(project(":spring-websocket"))
|
|
optional("javax.activation:javax.activation-api:1.2.0")
|
|
optional("javax.el:javax.el-api:3.0.1-b04")
|
|
optional("javax.inject:javax.inject:1")
|
|
optional("javax.servlet:javax.servlet-api:4.0.1")
|
|
optional("javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02")
|
|
optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
|
|
optional("javax.xml.bind:jaxb-api:2.3.1")
|
|
optional("javax.websocket:javax.websocket-api:1.1")
|
|
optional("junit:junit:4.13-beta-3")
|
|
optional("org.junit.jupiter:junit-jupiter-api")
|
|
optional("org.testng:testng:6.14.3")
|
|
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
|
|
optional("org.codehaus.groovy:groovy:${groovyVersion}")
|
|
optional("org.hamcrest:hamcrest-core:1.3")
|
|
optional("org.apache.taglibs:taglibs-standard-jstlel:1.2.5") {
|
|
exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
|
|
}
|
|
optional("net.sourceforge.htmlunit:htmlunit:2.35.0") {
|
|
exclude group: "commons-logging", module: "commons-logging"
|
|
}
|
|
optional("org.seleniumhq.selenium:htmlunit-driver:2.35.1") {
|
|
exclude group: "commons-logging", module: "commons-logging"
|
|
}
|
|
optional("org.seleniumhq.selenium:selenium-java:3.141.59") {
|
|
exclude group: "commons-logging", module: "commons-logging"
|
|
exclude group: "io.netty", module: "netty"
|
|
}
|
|
optional("org.xmlunit:xmlunit-matchers:2.6.2")
|
|
optional("org.skyscreamer:jsonassert:1.5.0")
|
|
optional("com.jayway.jsonpath:json-path:2.4.0")
|
|
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
|
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
|
optional("io.projectreactor:reactor-test")
|
|
optional("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}")
|
|
optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:${coroutinesVersion}")
|
|
testCompile(project(":spring-context-support"))
|
|
testCompile(project(":spring-oxm"))
|
|
testCompile("javax.annotation:javax.annotation-api:1.3.2")
|
|
testCompile("javax.cache:cache-api:1.1.0")
|
|
testCompile("javax.ejb:javax.ejb-api:3.2")
|
|
testCompile("javax.interceptor:javax.interceptor-api:1.2.2")
|
|
testCompile("javax.mail:javax.mail-api:1.6.2")
|
|
testCompile("org.hibernate:hibernate-core:5.4.3.Final")
|
|
testCompile("org.hibernate:hibernate-validator:6.0.17.Final")
|
|
testCompile("org.junit.platform:junit-platform-runner")
|
|
testCompile("org.junit.platform:junit-platform-testkit")
|
|
testCompile("org.junit.jupiter:junit-jupiter-params")
|
|
testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
|
|
testCompile("com.thoughtworks.xstream:xstream:1.4.10")
|
|
testCompile("com.rometools:rome:1.12.0")
|
|
testCompile("org.apache.tiles:tiles-api:${tiles3Version}")
|
|
testCompile("org.apache.tiles:tiles-core:${tiles3Version}", withoutJclOverSlf4j)
|
|
testCompile("org.apache.tiles:tiles-servlet:${tiles3Version}", withoutJclOverSlf4j)
|
|
testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
|
|
testCompile("org.apache.httpcomponents:httpclient:4.5.9") {
|
|
exclude group: "commons-logging", module: "commons-logging"
|
|
}
|
|
testCompile("io.projectreactor.netty:reactor-netty")
|
|
testCompile("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1")
|
|
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
|
|
// so that we can run JUnit 4 tests in IntelliJ IDEA.
|
|
testRuntime("org.junit.jupiter:junit-jupiter-engine")
|
|
testRuntime("org.junit.platform:junit-platform-launcher")
|
|
testRuntime("org.junit.vintage:junit-vintage-engine")
|
|
testRuntime("org.glassfish:javax.el:3.0.1-b08")
|
|
testRuntime("com.sun.xml.bind:jaxb-core:2.3.0.1")
|
|
testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0.1")
|
|
}
|
|
|
|
task testNG(type: Test) {
|
|
description = "Runs TestNG tests."
|
|
useTestNG()
|
|
scanForTestClasses = false
|
|
include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
|
|
// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
|
|
// testLogging.showStandardStreams = true
|
|
// forkEvery 1
|
|
}
|
|
|
|
task testJUnitJupiter(type: Test) {
|
|
description = "Runs JUnit Jupiter tests."
|
|
useJUnitPlatform {
|
|
includeEngines "junit-jupiter"
|
|
excludeTags "failing-test-case"
|
|
}
|
|
filter {
|
|
includeTestsMatching "org.springframework.test.context.junit.jupiter.*"
|
|
}
|
|
// Java Util Logging for the JUnit Platform.
|
|
// systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
|
|
}
|
|
|
|
test {
|
|
description = "Runs JUnit 4 tests."
|
|
dependsOn testJUnitJupiter, testNG
|
|
useJUnit()
|
|
scanForTestClasses = false
|
|
include(["**/*Tests.class", "**/*Test.class"])
|
|
exclude(["**/testng/**/*.*", "**/jupiter/**/*.*"])
|
|
}
|
|
|
|
task aggregateTestReports(type: TestReport) {
|
|
description = "Aggregates JUnit and TestNG test reports."
|
|
destinationDir = test.reports.html.destination
|
|
reportOn test, testJUnitJupiter, testNG
|
|
}
|
|
|
|
check.dependsOn aggregateTestReports
|