Lindomar reitz add support to match integers and floats #108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
continuation of #38
fixes #13 by utilising regex string from pact-jvm
notes from previous PR
This updated change will allow int/float(decimal) values to be changed to string at the point of comparison against the regex, both during consumer and provider tests.
On the provider side, if the value is a float or string, the error message returned returns the object type in the message.
With regard to existing behaviour, it may also be noted that using
Pact.like(1)
orPact.like(50.51)
will serialising the correct value to the contract (int or float) however the provider test would pass with a type match, when the provider returns50
and the consumer setPact.like(50.51)
.Integer
Float / Decimal