Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-autotest-live
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiamai-test
xm-autotest-live
Commits
120386d4
Commit
120386d4
authored
Feb 19, 2021
by
fanyuanmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:视频课详情接口报错
parent
5e42fa90
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
src/main/java/com/live/cases/videoClass/TestEditLessonSchedule.java
+3
-2
src/main/java/com/live/cases/videoClass/TestGetLessonScheduleDetail.java
+4
-3
No files found.
src/main/java/com/live/cases/videoClass/TestEditLessonSchedule.java
View file @
120386d4
...
@@ -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
jsonBody
0
=
xmAppApi
.
getBodyInJSON
();
JSONObject
jsonObject1
=
getVideoClassData
.
VideoClassData
();
JSONObject
jsonObject1
=
getVideoClassData
.
VideoClassData
();
...
...
src/main/java/com/live/cases/videoClass/TestGetLessonScheduleDetail.java
View file @
120386d4
...
@@ -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
jsonBody
0
=
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
,
jsonBody
0
.
getJSONObject
(
"result"
).
getString
(
"id"
));
//与列表第一个视频课id比对
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment