File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed
src/test/java/com/example/products Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1- 11
1+ 11.0
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ plugins {
22 id ' org.springframework.boot' version ' 2.2.2.RELEASE'
33 id ' io.spring.dependency-management' version ' 1.0.8.RELEASE'
44 id ' java'
5- id " au.com.dius.pact" version " 4.2.0 "
5+ id " au.com.dius.pact" version " 4.5.9 "
66}
77
88group = ' com.example'
@@ -22,7 +22,7 @@ configurations {
2222dependencies {
2323 implementation ' org.springframework.boot:spring-boot-starter-web'
2424 implementation " org.apache.httpcomponents:fluent-hc:4.5.5"
25- testCompile ' au.com.dius.pact.consumer:junit5:4.2.18 '
25+ testImplementation ' au.com.dius.pact.consumer:junit5:4.5.9 '
2626
2727 compileOnly ' org.projectlombok:lombok'
2828 annotationProcessor ' org.projectlombok:lombok'
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-6 .6.1 -bin.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-7 .6.3 -bin.zip
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change 1010import au .com .dius .pact .consumer .junit5 .PactConsumerTestExt ;
1111import au .com .dius .pact .consumer .junit5 .PactTestFor ;
1212import org .junit .jupiter .api .Test ;
13+ import au .com .dius .pact .core .model .PactSpecVersion ; // required for v4.6.x to set pactVersion
1314
1415import java .io .IOException ;
1516import java .util .List ;
@@ -40,7 +41,7 @@ public RequestResponsePact getProduct(PactDslWithProvider builder) {
4041 .toPact ();
4142 }
4243
43- @ PactTestFor (pactMethod = "getProduct" )
44+ @ PactTestFor (pactMethod = "getProduct" , pactVersion = PactSpecVersion . V3 )
4445 @ Test
4546 public void testGetProduct (MockServer mockServer ) throws IOException {
4647 Product product = new ProductClient ().setUrl (mockServer .getUrl ()).getProduct ("10" );
@@ -65,7 +66,7 @@ public RequestResponsePact getProducts(PactDslWithProvider builder) {
6566 .toPact ();
6667 }
6768
68- @ PactTestFor (pactMethod = "getProducts" )
69+ @ PactTestFor (pactMethod = "getProducts" , pactVersion = PactSpecVersion . V3 )
6970 @ Test
7071 public void testGetProducts (MockServer mockServer ) throws IOException {
7172 List <Product > products = new ProductClient ().setUrl (mockServer .getUrl ()).getProducts ();
You can’t perform that action at this time.
0 commit comments