Skip to content

Commit

Permalink
added pact root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ollin committed Feb 10, 2017
1 parent 7982612 commit cf339de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 4 additions & 0 deletions invoice-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jar {
}
}

test {
systemProperties['pact.rootDir'] = "$rootDir/build/pacts"
}

repositories {
mavenCentral()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import static au.com.dius.pact.consumer.ConsumerPactTest.PACT_VERIFIED;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;

/**
Expand All @@ -35,14 +34,9 @@ public class AddressServiceAdapterTest {

@Test
public void shouldDeliverAnAddress() {
MockProviderConfig config = MockProviderConfig.createDefault(PactSpecVersion.V3);

String responseBody = QuoteUtil.convert("{'forename': 'Jan', 'surname': 'Wloka'}");

PactFragment fragment = buildPactFragment("", responseBody, "get an address");



runTest(fragment);
}

Expand Down Expand Up @@ -79,7 +73,6 @@ public void run(MockProviderConfig config) {
throw new RuntimeException(((PactError)result).error());
}

assertEquals(PACT_VERIFIED, result);
assertThat(result, is(PACT_VERIFIED));
}

}

0 comments on commit cf339de

Please sign in to comment.