Commit 1f5834e5 by zhangying

补充了5个case

parent 171c4ff0
......@@ -46,7 +46,7 @@ public class TestCommonFolderList extends XMBaseTest {
Assert.assertEquals("true",responseRes.getString("success"));
}
@Test(description = "公共文件列表,按名称排序")
@Test(description = "公共文件列表,按名称降序排序")
public void testCommonFolderList1(){
JSONObject jsonObject = new JSONObject();
jsonObject.put("current",1);
......@@ -66,4 +66,109 @@ public class TestCommonFolderList extends XMBaseTest {
Assert.assertEquals("true",responseRes.getString("success"));
Assert.assertNotNull(responseRes.getJSONObject("result").getString("total"));
}
@Test(description = "公共文件列表,按名称升序排序")
public void testCommonFolderList2(){
JSONObject jsonObject = new JSONObject();
jsonObject.put("current",1);
jsonObject.put("disk", "COMMON");
jsonObject.put("folderIdType", "FOLDER");
jsonObject.put("instId",xmAppApi.getLoginInfo().getInstId());
jsonObject.put("searchName", null);
jsonObject.put("size", 10);
jsonObject.put("sort", "NAME_ASC");
jsonObject.put("parentId", null);
System.out.println("请求" + jsonObject);
xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers);
JSONObject responseRes = xmAppApi.getBodyInJSON();
System.out.println("responseRes =="+responseRes );
Assert.assertEquals("true",responseRes.getString("success"));
Assert.assertNotNull(responseRes.getJSONObject("result").getString("total"));
}
@Test(description = "公共文件列表,按更新时间升序排序")
public void testCommonFolderList3(){
JSONObject jsonObject = new JSONObject();
jsonObject.put("current",1);
jsonObject.put("disk", "COMMON");
jsonObject.put("folderIdType", "FOLDER");
jsonObject.put("instId",xmAppApi.getLoginInfo().getInstId());
jsonObject.put("searchName", null);
jsonObject.put("size", 10);
jsonObject.put("sort", "UPDATE_ASC");
jsonObject.put("parentId", null);
System.out.println("请求" + jsonObject);
xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers);
JSONObject responseRes = xmAppApi.getBodyInJSON();
System.out.println("responseRes =="+responseRes );
Assert.assertEquals("true",responseRes.getString("success"));
Assert.assertNotNull(responseRes.getJSONObject("result").getString("total"));
}
@Test(description = "公共文件列表,按更新时间降序排序")
public void testCommonFolderList4(){
JSONObject jsonObject = new JSONObject();
jsonObject.put("current",1);
jsonObject.put("disk", "COMMON");
jsonObject.put("folderIdType", "FOLDER");
jsonObject.put("instId",xmAppApi.getLoginInfo().getInstId());
jsonObject.put("searchName", null);
jsonObject.put("size", 10);
jsonObject.put("sort", "UPDATE_DESC");
jsonObject.put("parentId", null);
System.out.println("请求" + jsonObject);
xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers);
JSONObject responseRes = xmAppApi.getBodyInJSON();
System.out.println("responseRes =="+responseRes );
Assert.assertEquals("true",responseRes.getString("success"));
Assert.assertNotNull(responseRes.getJSONObject("result").getString("total"));
}
@Test(description = "公共文件列表,按文件大小升序排序")
public void testCommonFolderList5(){
JSONObject jsonObject = new JSONObject();
jsonObject.put("current",1);
jsonObject.put("disk", "COMMON");
jsonObject.put("folderIdType", "FOLDER");
jsonObject.put("instId",xmAppApi.getLoginInfo().getInstId());
jsonObject.put("searchName", null);
jsonObject.put("size", 10);
jsonObject.put("sort", "SIZE_ASC");
jsonObject.put("parentId", null);
System.out.println("请求" + jsonObject);
xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers);
JSONObject responseRes = xmAppApi.getBodyInJSON();
System.out.println("responseRes =="+responseRes );
Assert.assertEquals("true",responseRes.getString("success"));
Assert.assertNotNull(responseRes.getJSONObject("result").getString("total"));
}
@Test(description = "公共文件列表,按文件大小降序排序")
public void testCommonFolderList6(){
JSONObject jsonObject = new JSONObject();
jsonObject.put("current",1);
jsonObject.put("disk", "COMMON");
jsonObject.put("folderIdType", "FOLDER");
jsonObject.put("instId",xmAppApi.getLoginInfo().getInstId());
jsonObject.put("searchName", null);
jsonObject.put("size", 10);
jsonObject.put("sort", "SIZE_DESC");
jsonObject.put("parentId", null);
System.out.println("请求" + jsonObject);
xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers);
JSONObject responseRes = xmAppApi.getBodyInJSON();
System.out.println("responseRes =="+responseRes );
Assert.assertEquals("true",responseRes.getString("success"));
Assert.assertNotNull(responseRes.getJSONObject("result").getString("total"));
}
}
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