I am currently trying to design some test cases for a project I'm working on and I want to simulate that the Post request gets denied of some data isn't correct.
I have the following request body (JSON format):
{
"key": "key",
"name": "a name",
"latitude": 123.345,
"longitude": 543.321,
"shortName": "SHORT",
"isDepot": false,
"isReliefPoint": false
}
And in the example for this request I was trying to match ANY key that fitted my validations, in this case with a maximum of 5 characters:
{
"key": "\b\w{1,5}\b",
"name": "a name",
"latitude": 123.345,
"longitude": 543.321,
"shortName": "SHORT",
"isDepot": false,
"isReliefPoint": false
}
Anyone knows a way to achieve what I am currently trying?
Aucun commentaire:
Enregistrer un commentaire