Hey! I’m trying out Pact for Java. Naturally I wan...
# pact-jvm
m
Hey! I’m trying out Pact for Java. Naturally I wanted to start out with the consumer, but it looks like all the Java documentation is written for the previous API (3.x.x), and they don’t seem to work for v4. The example docs use the following api/format:
Copy code
@Pact(provider="test_provider", consumer="test_consumer")
    public RequestResponsePact createPact(PactDslWithProvider builder) {
However, this isn’t compatible with the latest version:
Copy code
<dependency>
            <groupId>au.com.dius.pact.consumer</groupId>
            <artifactId>junit5</artifactId>
            <version>4.3.14</version>
            <scope>test</scope>
        </dependency>
java.lang.UnsupportedOperationException: Method testPact does not conform required method signature 'public <http://au.com|au.com>.dius.pact.core.model.V4Pact xxx(PactBuilder builder)'
Could someone point me in the direction of an updated example using the new DSL?
m
Nice, thanks 👍