Commit 63aec8c2 by yangfangfang

随机生成的短信充值订单是3位,已经有可能存在了,改成6了

parent d3d2e8db
...@@ -35,7 +35,7 @@ public class TestGetSmsRechargeOrderStatus extends XMBaseTest { ...@@ -35,7 +35,7 @@ public class TestGetSmsRechargeOrderStatus extends XMBaseTest {
public void testGetSmsRechargeOrderStatus(){ public void testGetSmsRechargeOrderStatus(){
//随机生成订单id //随机生成订单id
String orderId = RandomStringUtil.randomNumber(3,""); String orderId = RandomStringUtil.randomNumber(6,"");
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
object.put("orderId",orderId); object.put("orderId",orderId);
...@@ -46,6 +46,7 @@ public class TestGetSmsRechargeOrderStatus extends XMBaseTest { ...@@ -46,6 +46,7 @@ public class TestGetSmsRechargeOrderStatus extends XMBaseTest {
//调用请求 //调用请求
xmAppApi.doRequest(RequestType.JSON,params,object.toJSONString(),headers); xmAppApi.doRequest(RequestType.JSON,params,object.toJSONString(),headers);
boolean flag = Boolean.parseBoolean(XMJSONPath.readPath(xmAppApi.getBodyInJSON(),"$.success")); boolean flag = Boolean.parseBoolean(XMJSONPath.readPath(xmAppApi.getBodyInJSON(),"$.success"));
if(flag==false){ if(flag==false){
Assert.assertEquals(XMJSONPath.readPath(xmAppApi.getBodyInJSON(),"$.message"),"充值订单不存在"); Assert.assertEquals(XMJSONPath.readPath(xmAppApi.getBodyInJSON(),"$.message"),"充值订单不存在");
}else { }else {
......
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