Commit 120386d4 by fanyuanmeng

fix:视频课详情接口报错

parent 5e42fa90
...@@ -60,7 +60,8 @@ public class TestEditLessonSchedule extends XMBaseTest { ...@@ -60,7 +60,8 @@ public class TestEditLessonSchedule extends XMBaseTest {
scheduleMedia.add(textMap); scheduleMedia.add(textMap);
GetVideoClassData getVideoClassData = new GetVideoClassData(); GetVideoClassData getVideoClassData = new GetVideoClassData();
String id = getVideoClassData.createVideoClass(); JSONObject jsonBody = getVideoClassData.VideoClassData();
String id = jsonBody.getJSONObject("result").getJSONArray("records").getJSONObject(0).getString("id");
Map bodyMap = new HashMap(); Map bodyMap = new HashMap();
...@@ -80,7 +81,7 @@ public class TestEditLessonSchedule extends XMBaseTest { ...@@ -80,7 +81,7 @@ public class TestEditLessonSchedule extends XMBaseTest {
xmAppApi.doRequest(RequestType.JSON, params, bodyData, headers); xmAppApi.doRequest(RequestType.JSON, params, bodyData, headers);
System.out.println(xmAppApi); System.out.println(xmAppApi);
com.alibaba.fastjson.JSONObject jsonBody = xmAppApi.getBodyInJSON(); com.alibaba.fastjson.JSONObject jsonBody0 = xmAppApi.getBodyInJSON();
JSONObject jsonObject1 = getVideoClassData.VideoClassData(); JSONObject jsonObject1 = getVideoClassData.VideoClassData();
......
...@@ -34,7 +34,8 @@ public class TestGetLessonScheduleDetail extends XMBaseTest { ...@@ -34,7 +34,8 @@ public class TestGetLessonScheduleDetail extends XMBaseTest {
public void testGetLessonScheduleDetail(){ public void testGetLessonScheduleDetail(){
GetVideoClassData getVideoClassData = new GetVideoClassData(); GetVideoClassData getVideoClassData = new GetVideoClassData();
String scheduleId = getVideoClassData.createVideoClass(); JSONObject jsonBody = getVideoClassData.VideoClassData();
String scheduleId = jsonBody.getJSONObject("result").getJSONArray("records").getJSONObject(0).getString("id");
Map bodyMap = new HashMap(); Map bodyMap = new HashMap();
bodyMap.put("scheduleId",scheduleId); bodyMap.put("scheduleId",scheduleId);
...@@ -44,12 +45,12 @@ public class TestGetLessonScheduleDetail extends XMBaseTest { ...@@ -44,12 +45,12 @@ public class TestGetLessonScheduleDetail extends XMBaseTest {
xmAppApi.doRequest(RequestType.JSON, params, bodyData, headers); xmAppApi.doRequest(RequestType.JSON, params, bodyData, headers);
System.out.println(xmAppApi); System.out.println(xmAppApi);
com.alibaba.fastjson.JSONObject jsonBody = xmAppApi.getBodyInJSON(); com.alibaba.fastjson.JSONObject jsonBody0 = xmAppApi.getBodyInJSON();
JSONObject jsonObject1 = getVideoClassData.VideoClassData(); JSONObject jsonObject1 = getVideoClassData.VideoClassData();
String scheduleId0 = jsonObject1.getJSONObject("result").getJSONArray("records").getJSONObject(0).getString("id"); String scheduleId0 = jsonObject1.getJSONObject("result").getJSONArray("records").getJSONObject(0).getString("id");
Assert.assertEquals(scheduleId0,jsonBody.getJSONObject("result").getString("id"));//与列表第一个视频课id比对 Assert.assertEquals(scheduleId0,jsonBody0.getJSONObject("result").getString("id"));//与列表第一个视频课id比对
} }
......
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