Commit bd36e27c by xyy

case优化

parent a5a7b901
...@@ -43,7 +43,14 @@ public class TestGetTenantSmsRecordDetail extends XMBaseTest { ...@@ -43,7 +43,14 @@ public class TestGetTenantSmsRecordDetail extends XMBaseTest {
//调用请求 //调用请求
xmAppApi.doRequest(RequestType.JSON,params,object.toJSONString(),headers).assetsSuccess(false); xmAppApi.doRequest(RequestType.JSON,params,object.toJSONString(),headers).assetsSuccess(false);
JSONObject response = xmAppApi.getBodyInJSON(); JSONObject response = xmAppApi.getBodyInJSON();
String code = XMJSONPath.readPath(response,"$.code");
switch (code){
case "500":
Assert.assertEquals(XMJSONPath.readPath(response,"$.message"),"ILLEGAL_ARGUMENT");
break;
default:
//因未充值,检验失败 //因未充值,检验失败
Assert.assertEquals(XMJSONPath.readPath(response,"$.message"),"校验失败"); Assert.assertEquals(XMJSONPath.readPath(response,"$.message"),"校验失败");
} }
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment