Permalink
Browse files

Add member price

The travel offers app needs a members price.

This will publish an updated contract and cause the API provider (SEAL API) contract to break.
  • Loading branch information...
agenteo committed May 24, 2017
1 parent 1f8a604 commit 41f4f51d2aa2344a02813f1af99f4e3fe140bb9c
@@ -15,6 +15,8 @@
@JsonProperty("offer_end_date")
private String offerEndDate;
private String price;
@JsonProperty("members_price")
private String membersPrice;
public String getUuid() {
return uuid;
@@ -43,4 +45,8 @@ public String getOfferEndDate() {
public String getPrice() {
return price;
}
public String getMembersPrice() {
return membersPrice;
}
}
@@ -53,6 +53,7 @@ public PactFragment createFragment(PactDslWithProvider builder) throws IOExcepti
.stringMatcher("status", "NEW|OK|ENDING", "OK")
.stringMatcher("offer_start_date", ".*", "2012-03-02T08:00:00.000Z")
.decimalType("price", 2000.22)
.decimalType("members_price", 1799.99)
.stringMatcher("offer_end_date", ".*", "2014-07-01T03:59:59.999Z")
.closeObject();
@@ -96,6 +97,7 @@ public void runOffersTest() throws IOException {
assertThat(travelOfferEntities.get(0).getOfferStartDate(), not(nullValue()));
assertThat(travelOfferEntities.get(0).getOfferEndDate(), not(nullValue()));
assertThat(travelOfferEntities.get(0).getPrice(), not(nullValue()));
assertThat(travelOfferEntities.get(0).getMembersPrice(), not(nullValue()));
}
}

0 comments on commit 41f4f51

Please sign in to comment.