I have to write some automation tests but I don't have an idea how it's should look like.
I got API method which checking all visible answers on form (radio buttons, text fields, drop-down lists etc.)
For example I want to select question 123456 as "Yes", so I need to sent request like this:
[{
"key": "123456",
"values": [
{"id": "true"}
]
}]
In response I'll receive the same key/values like in request.
My problem is that I need to send multiple keys/values to check that all fields are triggered and compare this with correct model.
I'm using JsonDeserializeHelper to map json to IList. So model and answer from service are deserialized. And it's look like this:
How should I compare this jsons with correct programming and testing patterns? Compare two Ilist -> key/value by key/value, then if there are not the same throw exception?
Aucun commentaire:
Enregistrer un commentaire