在url中测试param

时间:2018-02-19 14:51:04

标签: java spring-boot

如果id有效,如何使用unittest检查?

我发送了put请求 http://localhost:8080/xxx/xx/xxx/xxx/xxxx/9991。 9991-这是{Id}

{
"endCustomerId": "9991",
"name": "John",
"lastName": "Smith",
"dateOfBirth": "1978-02-02",
"nationality": "GB"
}

我想防止以下情况 http://localhost:8080/xxx/xx/xxx/xxx/xxxx/9991

{
"endCustomerId": "**12431**",
"name": "John",
"lastName": "Smith",
"dateOfBirth": "1978-02-02",
"nationality": "PL"
}

0 个答案:

没有答案
相关问题