Commit 8d7b1ca7 by zhangying

review

parent 5bb973fa
......@@ -29,7 +29,7 @@ public class TestMoveFolder extends XMBaseTest {
}
/**
* 测试创建乐器陪练课
* 测试移动文件夹-移动到自身文件夹
*/
@Test
public void testMoveFolder() {
......@@ -55,4 +55,32 @@ public class TestMoveFolder extends XMBaseTest {
Assert.assertEquals("不能将文件移动到自身或其子目录下", jsonBody.getString("message"));
}
/**
* 测试移动文件夹-移动到其他文件夹
*/
@Test
public void testMoveFolder1() {
GetFolderData getFolderData = new GetFolderData();
JSONObject folderList = getFolderData.getFolderList();
String folderId = folderList.getJSONObject("result").getJSONArray("records").getJSONObject(0).getString("id");
String folderId1 = folderList.getJSONObject("result").getJSONArray("records").getJSONObject(1).getString("id");
List moveIds = new ArrayList();
moveIds.add(folderId);
JSONObject jsonObject = new JSONObject();
jsonObject.put("disk","MYSELF");
jsonObject.put("moveIds",moveIds);
jsonObject.put("newParentId",folderId1);
xmAppApi.doRequest(RequestType.JSON, params, jsonObject.toJSONString(), headers);
JSONObject jsonBody = xmAppApi.getBodyInJSON();
System.out.println("jsonBody = "+jsonBody);
Assert.assertEquals("true", jsonBody.getString("success"));
Assert.assertEquals("操作成功!", jsonBody.getString("message"));
}
}
......@@ -46,7 +46,6 @@ public class TestSaveFolder extends XMBaseTest {
bodyMap.put("name", name);
bodyMap.put("parentId", null);
String bodydata = JSONObject.toJSONString(bodyMap);
// 接口请求 返回responseBody
......
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