Merge branch '4.0.x'

This commit is contained in:
Marcin Grzejszczak
2023-06-19 17:02:58 +02:00
2 changed files with 4 additions and 5 deletions

View File

@@ -48,9 +48,9 @@ dependencies {
contractTest {
useJUnitPlatform()
systemProperty 'spring.profiles.active', 'gradle'
testLogging {
exceptionFormat = 'full'
}
// testLogging {
// exceptionFormat = 'full'
// }
afterSuite { desc, result ->
if (!desc.parent) {
println "Results: (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"

View File

@@ -150,8 +150,7 @@ public class Contract {
public static void assertContract(Contract dsl) {
if (dsl.getRequest() != null) {
if (dsl.request.getUrl() == null && dsl.request.getUrlPath() == null) {
throw new IllegalStateException(
"URL is missing for HTTP contract");
throw new IllegalStateException("URL is missing for HTTP contract");
}
if (dsl.request.getMethod() == null) {
throw new IllegalStateException("Method is missing for HTTP contract");