Quantcast
Channel: Active questions tagged consumer - Stack Overflow
Viewing all articles
Browse latest Browse all 87

Match any value from list of strings

$
0
0

I new pact testing, I have a pact consumer test in which a property can have any value from a defined set of string:

this.pact        .ExpectsToReceive("an event indicating that an order has been created")        .WithJsonContent(new            {               PayloadType = Match.MinType(new List<string> { "apple", "orange" }, 1),           })

Not sure how to match PayloadType to have one value either "apple" or "orange". Please guide.


Viewing all articles
Browse latest Browse all 87

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>