Commit 150d7c46 by DuJunLi

增加断言校验

parent 59e96537
...@@ -29,6 +29,9 @@ public class TestDelCampScheduleItem extends SelectTargetTrainingCampAndGetInfo{ ...@@ -29,6 +29,9 @@ public class TestDelCampScheduleItem extends SelectTargetTrainingCampAndGetInfo{
String campId = ""; String campId = "";
String chiefCoachId = ""; String chiefCoachId = "";
String ruldId = ""; String ruldId = "";
int loopNum=0;
String[] weekDaysArray = {"TUESDAY", "THURSDAY", "SATURDAY", "SUNDAY"};
List<String> weekdaysList = Arrays.asList(weekDaysArray);
@BeforeClass @BeforeClass
public void beforeTest() { public void beforeTest() {
...@@ -39,9 +42,7 @@ public class TestDelCampScheduleItem extends SelectTargetTrainingCampAndGetInfo{ ...@@ -39,9 +42,7 @@ public class TestDelCampScheduleItem extends SelectTargetTrainingCampAndGetInfo{
//1.2获取训练营活动的指定教练ID //1.2获取训练营活动的指定教练ID
chiefCoachId = super.chiefCoachId; chiefCoachId = super.chiefCoachId;
//获取目标时间段内 最大有效课时数 //获取目标时间段内 最大有效课时数
String[] weekDaysArray = {"TUESDAY", "THURSDAY", "SATURDAY", "SUNDAY"}; loopNum = campScheduleTools.queryExpectedLoopNum(CommUtil.oneKeyGetAddDay(3), super.openEndDate, weekdaysList);
List<String> weekdaysList = Arrays.asList(weekDaysArray);
int loopNum = campScheduleTools.queryExpectedLoopNum(CommUtil.oneKeyGetAddDay(3), super.openEndDate, weekdaysList);
//创建训练营排课:按次数 星期:2,4,6,7 //创建训练营排课:按次数 星期:2,4,6,7
campScheduleTools.oneKeyCreateCampRuleSchedule(campId, chiefCoachId, super.courseId, campScheduleTools.oneKeyCreateCampRuleSchedule(campId, chiefCoachId, super.courseId,
...@@ -98,6 +99,13 @@ public class TestDelCampScheduleItem extends SelectTargetTrainingCampAndGetInfo{ ...@@ -98,6 +99,13 @@ public class TestDelCampScheduleItem extends SelectTargetTrainingCampAndGetInfo{
String startDate = CommUtil.oneKeyGetNextWeekXDay(12);//下周六00点时间 String startDate = CommUtil.oneKeyGetNextWeekXDay(12);//下周六00点时间
campScheduleTools.getCampScheduleTable(startDate, super.openEndDate); campScheduleTools.getCampScheduleTable(startDate, super.openEndDate);
Assert.assertEquals(XMJSONPath.readPath(dataApi.getApi_response(), "$.result.totalCount"), "0"); Assert.assertEquals(XMJSONPath.readPath(dataApi.getApi_response(), "$.result.totalCount"), "0");
//删除成功后,check对应训练营活动的已排课次数是否同步变更
int delLoopNum=campScheduleTools.queryExpectedLoopNum(startDate, super.openEndDate, weekdaysList);
//查看日程,获取原规则中展示的训练营已排课课次数,原来已排课课次数-删除的已排课课次数
campScheduleTools.getCampRuleScheduleDetail(ruldId);
Assert.assertTrue(XMJSONPath.getJSONObjectByReadPath(dataApi.getApi_response(),"$.result.campVO").getIntValue("scheduleClassHour")==(loopNum-delLoopNum));
} }
} }
......
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