Commit 2c61ad88 by zhangyuxiao

修改今日待上课校验

parent 8f570485
......@@ -57,9 +57,7 @@ public class TestCreateGroupRuleSchedule extends BaseTestImpl {
@Test(description = "测试新建团课排课")
public void testCreateGroupRuleSchedule() throws InterruptedException {
//查询今日待上课的数据
HomeTools homeTools = new HomeTools();
int num = homeTools.queryTodaySchedule().getJSONArray("result").size();
//获取存量课程ID
String courseId = groupScheduleTools.getStockGroupCourseId(courseName);
......@@ -101,9 +99,10 @@ public class TestCreateGroupRuleSchedule extends BaseTestImpl {
Assert.assertTrue(scheduleId!=null||!scheduleId.isEmpty(),"刚创建的规则中,没查询到今天对应的课次");
//创建今日待上课的排课后再查询今日待上课的数据
int num1 = homeTools.queryTodaySchedule().getJSONArray("result").size();
Assert.assertEquals(num1, num + 1);
//创建今日待上课的排课后查询今日待上课的数据
long num= homeTools.queryTodaySchedule().getJSONArray("result").toJavaList(JSONObject.class).stream()
.filter(e ->e.getString("scheduleId").equals(scheduleId)).count();
Assert.assertEquals(num, 1);
groupScheduleTools.delGroupRuleSchedule(ruldId, true);
Thread.sleep(1000);
......@@ -114,6 +113,11 @@ public class TestCreateGroupRuleSchedule extends BaseTestImpl {
//删除成功后,统计查询到的目标日程数量为0
Assert.assertTrue(delRuldCount == 0);
//删除今日待上课的排课后查询今日待上课的数据
long num1= homeTools.queryTodaySchedule().getJSONArray("result").toJavaList(JSONObject.class).stream()
.filter(e ->e.getString("scheduleId").equals(scheduleId)).count();
Assert.assertEquals(num1, 0);
}
......
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