Commit c873cfec by xyy

fix短信充值失败

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