Skip to content

Commit

Permalink
chore(test): change a product id
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Dec 10, 2024
1 parent e70958b commit 25a0c8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/java/com/example/products/ProductsPactTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public RequestResponsePact getProduct(PactDslWithProvider builder) {
PactDslJsonBody body = new PactDslJsonBody();
body.stringType("name", "product name");
body.stringType("type", "product series");
body.stringType("id", "5cc989d0-d800-434c-b4bb-b1268499e850");
body.stringType("id", "5cc989d1-d800-434c-b4bb-b1268499e850");

return builder
.given("a product with ID 10 exists")
Expand All @@ -46,7 +46,7 @@ public RequestResponsePact getProduct(PactDslWithProvider builder) {
public void testGetProduct(MockServer mockServer) throws IOException {
Product product = new ProductClient().setUrl(mockServer.getUrl()).getProduct("10");

assertThat(product.getId(), is("5cc989d0-d800-434c-b4bb-b1268499e850"));
assertThat(product.getId(), is("5cc989d1-d800-434c-b4bb-b1268499e850"));
}

@Pact(consumer="pactflow-example-consumer-java-junit")
Expand All @@ -71,6 +71,6 @@ public RequestResponsePact getProducts(PactDslWithProvider builder) {
public void testGetProducts(MockServer mockServer) throws IOException {
List<Product> products = new ProductClient().setUrl(mockServer.getUrl()).getProducts();

assertThat(products.get(0).getId(), is("5cc989d0-d800-434c-b4bb-b1268499e850"));
assertThat(products.get(0).getId(), is("5cc989d1-d800-434c-b4bb-b1268499e850"));
}
}

0 comments on commit 25a0c8f

Please sign in to comment.