package com.xiaomai.cases.polar.admin;


import com.alibaba.fastjson.JSONObject;
import com.xiaomai.basetest.BaseTestImpl;
import com.xiaomai.enums.ApiModule;
import com.xiaomai.enums.LoginAccount;
import com.xiaomai.enums.RequestType;
import com.xiaomai.enums.Terminal;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;


/**
 * @BelongsProject: xm-sportstest
 * @BelongsPackage: com.xiaomai.cases.polar.admin
 * @Author: xuyamei
 * @CreateTime: 2024-04-19  13:56
 * @Description: 查询场馆角色列表
 * @Version: 1.0
 */
public class TestStudioRoleListByStudioId extends BaseTestImpl {
    @BeforeClass
    @Override
    public void beforeTest(){
        setTestInfo(ApiModule.Polar_Admin,"API_studioRole_listByStudioId", LoginAccount.GYM_PROD, Terminal.B,"xym");
        super.beforeTest();
    }

    @Test
    public void testStudioRoleListByStudioId(){
        xmAppApi.doRequest(RequestType.JSON,params,"",headers).assetsSuccess(true);
        JSONObject response = xmAppApi.getBodyInJSON();
        Assert.assertEquals(response.getJSONObject("result").getJSONArray("systemRoles").size(),6,"系统角色缺失或增加");
    }
}
