I am writing the Consumer Side Code for Pact using JVm-Junit library. However at the line : MockProviderConfig config = MockProviderConfig.createDefault(); i am getting error "createDefault() is not undefined for the type MockProviderConfig"
What can I do to proceed.
My POM File looks like this : http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 Consumer_0805 Consumer_080517 0.0.1-SNAPSHOT war
<dependencies>
<dependency>
<groupId>au.com.dius</groupId>
<artifactId>pact-jvm-consumer-junit_2.11</artifactId>
<version>3.2.9</version>
</dependency>
</dependencies>
Test Code :
package DSLDirectConsumerTest;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import au.com.dius.pact.consumer.ConsumerPactBuilder;
import au.com.dius.pact.model.MockProviderConfig;
import au.com.dius.pact.model.MockProviderConfig$;
import au.com.dius.pact.model.PactConfig;
import au.com.dius.pact.model.PactFragment;
import au.com.dius.pact.model.RequestResponsePact;
public class DirectDSLConsumerPactTest {
@Test
public void testPact() {
PactFragment pactFragment = ConsumerPactBuilder.consumer("Some Consumer").hasPactWith("Some Provider")
.uponReceiving("a request to say Hello").path("/hello").method("POST").body("{\"name\": \"harry\"}")
.willRespondWith().status(200).body("{\"hello\": \"harry\"}").toFragment();
MockProviderConfig.createDefault();
}
}