Skip to content

Commit

Permalink
Merge pull request #31 from pactflow/deps/pact_jvm_4_5_0
Browse files Browse the repository at this point in the history
Deps/pact jvm 4 5 0
  • Loading branch information
YOU54F authored Oct 7, 2024
2 parents adc06c9 + b524b27 commit 22f00f1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11
11.0
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'org.springframework.boot' version '2.2.2.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
id "au.com.dius.pact" version "4.2.0"
id "au.com.dius.pact" version "4.5.9"
}

group = 'com.example'
Expand All @@ -22,7 +22,7 @@ configurations {
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation "org.apache.httpcomponents:fluent-hc:4.5.5"
testCompile 'au.com.dius.pact.consumer:junit5:4.2.18'
testImplementation 'au.com.dius.pact.consumer:junit5:4.5.9'

compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 3 additions & 2 deletions src/test/java/com/example/products/ProductsPactTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import au.com.dius.pact.consumer.junit5.PactConsumerTestExt;
import au.com.dius.pact.consumer.junit5.PactTestFor;
import org.junit.jupiter.api.Test;
import au.com.dius.pact.core.model.PactSpecVersion; // required for v4.6.x to set pactVersion

import java.io.IOException;
import java.util.List;
Expand Down Expand Up @@ -40,7 +41,7 @@ public RequestResponsePact getProduct(PactDslWithProvider builder) {
.toPact();
}

@PactTestFor(pactMethod = "getProduct")
@PactTestFor(pactMethod = "getProduct", pactVersion = PactSpecVersion.V3)
@Test
public void testGetProduct(MockServer mockServer) throws IOException {
Product product = new ProductClient().setUrl(mockServer.getUrl()).getProduct("10");
Expand All @@ -65,7 +66,7 @@ public RequestResponsePact getProducts(PactDslWithProvider builder) {
.toPact();
}

@PactTestFor(pactMethod = "getProducts")
@PactTestFor(pactMethod = "getProducts", pactVersion = PactSpecVersion.V3)
@Test
public void testGetProducts(MockServer mockServer) throws IOException {
List<Product> products = new ProductClient().setUrl(mockServer.getUrl()).getProducts();
Expand Down

0 comments on commit 22f00f1

Please sign in to comment.