package com.live.cases.fileManage.commonFolder;

import com.alibaba.fastjson.JSONObject;
import com.live.enums.ApiModele;
import com.live.enums.RequestType;
import com.live.enums.Terminal;
import com.live.utils.XMBaseTest;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

//import com.live.utils.TimeSetting;

/**
 * @Description 文件列表，公共文件
 * @author zhangyumeng
 */

public class TestCommonFolderList extends XMBaseTest {

    @BeforeMethod
    public void beforeTest(){
        xmAppApi.setApiModule(ApiModele.CloudClass_B )
                .setApiName("API_commonFolderList")
                .setLoginUser("zhangYuM_b")
                .setTerminal(Terminal.B);
        dal.setCase_owner("张莹");

        super.beforeTest();
    }

    @Test
    public void testCommonFolderList(){
        JSONObject jsonObject = new JSONObject();
        //jsonObject.put("bizAccountId","1323235986786807809");
        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);
        System.out.println("请求" + jsonObject);

        xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers);
//
        JSONObject responseRes = xmAppApi.getBodyInJSON();
        Assert.assertEquals("true",responseRes.getString("success"));
    }
}
