Commit 6845488c by zhangying

文件夹添加成员

parent c49945c9
......@@ -32,7 +32,7 @@ public class TestAddRelation extends XMBaseTest {
* 测试课次添加关联文件
*/
@Test
public void testAddRelation() {
public void testAddRelationWithHave() {
List contentList = new ArrayList();
contentList.add("1329253624435363842");
System.out.println("contentList= "+contentList);
......
......@@ -34,12 +34,13 @@ public class TestAddCourseStu extends XMBaseTest {
* 测试乐器陪练课-添加学员"不扣课时学员(自动化测试)"
*/
// @Test
public void testAddCourseStu() {
@Test
public void testAddCourseStu() throws InterruptedException {
GetOnlyOneCourseData onlyOneCourseData = new GetOnlyOneCourseData();
JSONObject onlyOneClassCourse = onlyOneCourseData.creatOnlyOneCourse();
String liveCourseId = onlyOneClassCourse.getString("result");
System.out.println("liveCourseId ="+liveCourseId);
String studentId = "1358297612940660738";
List studentIds = new ArrayList();
......@@ -67,12 +68,13 @@ public class TestAddCourseStu extends XMBaseTest {
* 测试乐器陪练课-添加学员"扣课时学员(自动化测试)"
*/
// @Test
public void testAddCourseStu1() {
@Test
public void testAddCourseStu1() throws InterruptedException {
GetOnlyOneCourseData onlyOneCourseData = new GetOnlyOneCourseData();
JSONObject onlyOneClassCourse = onlyOneCourseData.creatOnlyOneCourse();
String liveCourseId = onlyOneClassCourse.getString("result");
System.out.println("liveCourseId ="+liveCourseId);
String studentId = "1358346398485405697";
JSONObject jsondata = new JSONObject();
......
......@@ -5,10 +5,13 @@ import com.live.enums.ApiModele;
import com.live.enums.RequestType;
import com.live.enums.Terminal;
import com.live.utils.RandomStringUtil;
import com.live.utils.TimeUtils;
import com.live.utils.XMBaseTest;
import com.mysql.jdbc.TimeUtil;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
public class GetOnlyOneCourseData extends XMBaseTest {
......@@ -31,12 +34,13 @@ public class GetOnlyOneCourseData extends XMBaseTest {
// dataApi.doRequest(RequestType.JSON, params, bodydata, dataheadrs);
dataApi.doRequest(RequestType.JSON, params, bodydata, headers);
System.out.println("dataApi ="+dataApi);
JSONObject liveCourseList=dataApi.getBodyInJSON();
return liveCourseList;
}
public JSONObject creatOnlyOneCourse() {
public JSONObject creatOnlyOneCourse() throws InterruptedException {
dataApi.setApiModule(ApiModele.CloudClass_apollo)
.setApiName("API_createCourse")
.setLoginUser("zhangy-b")
......@@ -45,8 +49,12 @@ public class GetOnlyOneCourseData extends XMBaseTest {
dataApi.doRequest(RequestType.JSON, params, buildCreateLargeClassLiveParam().toJSONString(), headers);
// dataApi.doRequest(RequestType.JSON, params, buildCreateLargeClassLiveParam().toJSONString(), dataheadrs);
System.out.println("dataApi ="+dataApi);
TimeUnit.SECONDS.sleep(3);
JSONObject liveCourse=dataApi.getBodyInJSON();
return liveCourse;
}
......@@ -54,7 +62,7 @@ public class GetOnlyOneCourseData extends XMBaseTest {
public JSONObject buildCreateLargeClassLiveParam() {
JSONObject onlyOneClassLive = new JSONObject();
onlyOneClassLive.put("courseName", RandomStringUtil.randomNumber(14, "course_"));
onlyOneClassLive.put("teacherId",xmAppApi.getLoginInfo().getTid());
onlyOneClassLive.put("teacherId",dataApi.getLoginInfo().getTid());
onlyOneClassLive.put("startTime",System.currentTimeMillis() + 60 * 1000);
onlyOneClassLive.put("endTime",System.currentTimeMillis() + 60 * 60 * 1000);
onlyOneClassLive.put("needRecord","YES");
......
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