Commit 1d30bd83 by xyy

短信管理case

parent 2d7e6f3f
package com.xiaomai.cases.polar.config; package com.xiaomai.cases.polar.config;
public class TestCurrentUser { import com.alibaba.fastjson.JSONObject;
import com.xiaomai.enums.ApiModule;
import com.xiaomai.enums.LoginAccount;
import com.xiaomai.enums.RequestType;
import com.xiaomai.enums.Terminal;
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
* @CreateTime: 2024-04-13 11:48
* @Description:获取当前使用者
* @Version: 1.0
*/
public class TestCurrentUser extends XMBaseTest {
@BeforeMethod
public void beforeTest(){
xmAppApi.setApiModule(ApiModule.Polar_Config)
.setApiName("API_currentUser")
.setLoginUser(LoginAccount.YFF_DEV)
.setTerminal(Terminal.B);
dal.setCase_owner("xyy")
.setCase_name(Thread.currentThread().getStackTrace()[1].getFileName().split("\\.")[0]);
super.beforeTest();
}
@Test(description = "获取当前使用者")
public void testCurrentUser(){
xmAppApi.doRequest(RequestType.JSON,params,"{}",headers).assetsSuccess(true);
JSONObject response = xmAppApi.getBodyInJSON();
Assert.assertEquals(XMJSONPath.readPath(response,"$.message"),"操作成功!");
Assert.assertTrue(response.getJSONArray("result").size() >= 0);
}
} }
...@@ -36,6 +36,8 @@ public class TestGetTenantSmsRecordPage extends XMBaseTest { ...@@ -36,6 +36,8 @@ public class TestGetTenantSmsRecordPage extends XMBaseTest {
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
object.put("current",0); object.put("current",0);
object.put("size",20); object.put("size",20);
object.put("beginTime",null);
object.put("endTime",null);
object.put("msgTypes",null); object.put("msgTypes",null);
object.put("studioId",xmAppApi.getLoginInfo().getStudioId()); object.put("studioId",xmAppApi.getLoginInfo().getStudioId());
......
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