Closed matt-sm closed 10 years ago
@matt-sm Thanks for letting us know. The intention of the comparisonPasses limit is to prevent really deeply nested objects and also remove any potential for infinite loops. We will take a look.
Out of interest why do you need so many objects in the mocked json response? The mocked response should only contain the data required to satisfy the consumers contract with the provider.
Cheers, Neil
No problem. In this case you're correct, I don't need such a large list of objects to verify the contract.
thanks
@matt-sm Awesome stuff! We also pushed a commit this morning which removes the limit. We decided this is no longer needed as Json.NET deals with circular references etc. https://github.com/SEEK-Jobs/pact-net/commit/9bb3e6dbda5af78a2a395d11fb3bb7a04b5c4128
I was trying to verify a json response that contained a list of about 50 objects and kept getting above error
Easy fix is to increase the _comparisonPasses in HttpBodyComparer.AssertPropertyValuesToMatch but was wondering if there is a better approach.