Commit e3ceaa4d by zhangying

Revert "review"

This reverts commit 56f2f1db
parent 56f2f1db
package com.live.cases.liveClientT.cloundClass; //package com.live.cases.apollo;
//
import com.alibaba.fastjson.JSONObject; //import com.alibaba.fastjson.JSONObject;
import com.live.enums.ApiModele; //import com.live.enums.ApiModele;
import com.live.enums.RequestType; //import com.live.enums.RequestType;
import com.live.enums.Terminal; //import com.live.enums.Terminal;
import com.live.utils.XMBaseTest; //import com.live.utils.XMBaseTest;
import org.testng.Assert; //import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeMethod; //import org.testng.annotations.Test;
import org.testng.annotations.Test; //
//
import static org.testng.Assert.assertTrue; ///**
// * title获取直播器启动协议
// * by张雨朦
/** // */
* title获取直播器启动协议 //
* by张雨朦 //public class TestCourseLaunch extends XMBaseTest {
*/ //
// @BeforeMethod
public class TestCourseLaunch extends XMBaseTest { // public void beforeTest(){
// xmAppApi.setApiModule(ApiModele.CloudClass_apollo)
@BeforeMethod // .setApiName("API_courseLaunch")
public void beforeTest(){ // .setLoginUser("zhangyumeng_huantuo")
xmAppApi.setApiModule(ApiModele.CloudClass_apollo) // .setTerminal(Terminal.B);
.setApiName("API_courseLaunch") // super.beforeTest();
.setLoginUser("zhangyumeng_huantuo") //欢拓的账号测试 // }
.setTerminal(Terminal.B); //
super.beforeTest(); // @Test
} // public void courseLaunch(){
//
@Test // JSONObject jsonObject = new JSONObject();
public void courseLaunch(){ // jsonObject.put("liveCourseId","1333692400423833602");
String protocol="huantuo://start#eyJiaWQiOiI0MzU5NjUiLCJldCI6MTYxNzQ0NTY5NSwiZXh0Ijp7ImNvdXJzZV9pZCI6MTQ0MjU3OX0sInNpZ24iOiI1ZTE5Zjk3YzRkZDlmNTk3YTJiNTk4NmI0OWY2OWRkZiJ9"; //
// xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers).assetsSuccess(true);
JSONObject jsonObject = new JSONObject(); // JSONObject responseRes = xmAppApi.getBodyInJSON();
jsonObject.put("liveCourseId","1333692400423833602"); //
// }
xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers).assetsSuccess(true); //
JSONObject responseRes = xmAppApi.getBodyInJSON(); //}
System.out.println("responseRes =="+responseRes);
// Assert.assertTrue(responseRes.getJSONObject("result").values().contains("protocol"));
Assert.assertEquals("true", responseRes.getString("success"));
Assert.assertEquals("操作成功!", responseRes.getString("message"));
Assert.assertEquals("200", responseRes.getString("code"));
// Assert.assertEquals( responseRes.getJSONObject("result").getString("protocol"),protocol);
}
}
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