Upgrade to 5.0.0-SNAPSHOT. Adjust to changes in Framework.

Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
This commit is contained in:
Olga Maciaszek-Sharma
2025-06-10 19:36:25 +02:00
parent c09dc87020
commit b61a1938b7
36 changed files with 1214 additions and 1064 deletions

View File

@@ -25,7 +25,7 @@ The following example shows a generated test:
package com.example.beer;
import com.example.BeerRestBase;
import javax.inject.Inject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.contract.verifier.http.HttpVerifier;
import org.springframework.cloud.contract.verifier.http.Request;
import org.springframework.cloud.contract.verifier.http.Response;
@@ -38,7 +38,7 @@ import static org.springframework.cloud.contract.verifier.http.Request.given;
@SuppressWarnings("rawtypes")
public class RestTest extends BeerRestBase {
@Inject HttpVerifier httpVerifier;
@Autowired HttpVerifier httpVerifier;
@Test
public void validate_shouldGrantABeerIfOldEnough() throws Exception {

View File

@@ -91,7 +91,8 @@ metadata:
----
====
Adding the metadata section will change the way the default, WireMock stub is built. It will now use the Spring Cloud Contract request matcher, so that e.g. the `query` part of the GraphQL request gets compared against the real request by ignoring whitespaces.
Adding the metadata section will change the way the default, WireMock stub is built.
It will now use the Spring Cloud Contract request matcher, so that e.g. the `query` part of the GraphQL request gets compared against the real request by ignoring whitespaces.
[[features-graphql-producer]]
== Producer Side Setup
@@ -177,7 +178,7 @@ public class BeerControllerGraphQLTest {
.contentType(MediaType.APPLICATION_JSON)
.body(REQUEST_BODY), String.class);
BDDAssertions.then(responseEntity.getStatusCodeValue()).isEqualTo(200);
BDDAssertions.then(responseEntity.getStatusCode().value()).isEqualTo(200);
}
}