Considering i have PACT json file and an interaction as below,
"interactions": [
{
"description": "a request to check the api response",
"providerState": "I call fixture service using a valid fixture Id 1234",
"request": {
"method": "get",
"path": "/api/v1.0/fixture/1234",
"headers": {
"Accept": "application/json",
"X-Clarksons-Security-Cloud": "xyz"
}
}
]
based on the provider state is there a way for me to get the value "1234" so I can run a pre data setup (before test) method before running the provider tests? I can see in the provider side I can do something like this pactVerifier.ProviderState("I call fixture service using a valid fixture Id 1234", setUp: InsertEventsIntoDatabase); But how do I get this value 1234 and pass it on to method InsertEventsIntoDatabase()?
Aucun commentaire:
Enregistrer un commentaire