On top of contract testing where we see if consumer and provider are in sync in terms of the structure of data exchanged, can we also have data level validations?
Let's consider this example of a kafka message :
{
Name : ABC
Age : 34
Address : XYZ
}
Now, structure wise -> all is good on both consumer and provider. Contract is Valid. PACT SUCCESS.
But can we also incorporate certain validations in our pact test cases where in if AGE < 18 is sent, this accounts for breach of contract and fail the pact.
(Here we would be considering data sent as well, not just the structure)