Previously, MockHttpServletRequest allowed its body to be ready multiple times using its InputStream. As of recent Spring Framework 5.1 snapshots, this is no longer the case. This commit moves to directly accessing the request's content as a byte array using getContentAsByteArray() which was introduced in Framework 5.0. Closes gh-515
26 lines
779 B
Groovy
26 lines
779 B
Groovy
description = 'Spring REST Docs MockMvc'
|
|
|
|
dependencies {
|
|
compile 'javax.servlet:javax.servlet-api'
|
|
compile 'org.springframework:spring-test'
|
|
compile project(':spring-restdocs-core')
|
|
optional 'junit:junit'
|
|
runtime 'org.springframework:spring-webmvc'
|
|
|
|
testCompile 'org.mockito:mockito-core'
|
|
testCompile 'org.hamcrest:hamcrest-library'
|
|
testCompile 'org.springframework.hateoas:spring-hateoas'
|
|
testCompile project(path: ':spring-restdocs-core', configuration: 'testArtifacts')
|
|
testRuntime 'commons-logging:commons-logging:1.2'
|
|
}
|
|
|
|
test {
|
|
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.restdocs.*"
|
|
}
|
|
|
|
matrixTest {
|
|
springFramework {
|
|
group = 'org.springframework'
|
|
versions = ['5.1.0.BUILD-SNAPSHOT']
|
|
}
|
|
} |