Commit c873cfec by xyy

fix短信充值失败

parent e8e5e659
......@@ -6,11 +6,11 @@ import com.xiaomai.enums.LoginAccount;
import com.xiaomai.enums.RequestType;
import com.xiaomai.enums.Terminal;
import com.xiaomai.utils.RandomStringUtil;
import com.xiaomai.utils.XMBaseTest;
import com.xiaomai.utils.XMJSONPath;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.xiaomai.utils.XMBaseTest;
/**
* @Author: xyy
......@@ -44,9 +44,13 @@ public class TestGetSmsRechargeOrderStatus extends XMBaseTest {
object.put("operatorId",xmAppApi.getLoginInfo().getAdminId());
//调用请求
xmAppApi.doRequest(RequestType.JSON,params,object.toJSONString(),headers).assetsSuccess(false);
JSONObject response = xmAppApi.getBodyInJSON();
Assert.assertEquals(XMJSONPath.readPath(response,"$.message"),"充值订单不存在");
xmAppApi.doRequest(RequestType.JSON,params,object.toJSONString(),headers);
boolean flag = Boolean.parseBoolean(XMJSONPath.readPath(xmAppApi.getBodyInJSON(),"$.success"));
if(flag==false){
Assert.assertEquals(XMJSONPath.readPath(xmAppApi.getBodyInJSON(),"$.message"),"充值订单不存在");
}else {
Assert.assertEquals(XMJSONPath.readPath(xmAppApi.getBodyInJSON(),"$.result.status"),"0");
}
}
}
......
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