Commit 736b972e by DuJunLi

优化代码

parent f13ff19e
......@@ -207,30 +207,20 @@ public class TestEditCurrentAndSubsequentCampSchedule extends SelectTargetTraini
.collect(Collectors.toList());
Assert.assertTrue(ruleIdIds22.size() == 1, "课次被删除后,编辑当前及后续,后续删除的课次没重新生成新的课次");
}
//删除数据
this.getTrainingTools().deleteTraining(campId);
//训练营被删除后,对应的排课日程会被自动删除check
campScheduleTools.getCampRuleScheduleList(campId, "", "");
Assert.assertTrue(XMJSONPath.getJSONArrayByReadPath(dataApi.getApi_response(), "$.result").toJavaList(JSONObject.class).stream().filter(e -> e.getString("ruleId").equals(ruldId)).count()==0, "训练营被删除后,对应的排课日程会被自动删除,目前还有相关数据ruldId请检查");
Assert.assertTrue(XMJSONPath.getJSONArrayByReadPath(dataApi.getApi_response(), "$.result").toJavaList(JSONObject.class).stream().filter(e -> e.getString("ruleId").equals(newRuldId)).count()==0, "训练营被删除后,对应的排课日程会被自动删除,目前还有相关数据newRuldId请检查");
@AfterTest(description = "删除此case创建的训练营排课日程")
public void delData() {
/* if (null != ruldId || !ruldId.isEmpty()) {
campScheduleTools.delCampRuleSchedule(ruldId);
}
if (null != newRuldId || !newRuldId.isEmpty()) {
campScheduleTools.delCampRuleSchedule(newRuldId);
}*/
}
if (null != super.campId || !super.campId.isEmpty()) {
this.getTrainingTools().deleteTraining(super.campId);
//训练营被删除后,对应的排课日程会被自动删除check
campScheduleTools.getCampRuleScheduleList(super.campId, "", "");
Assert.assertTrue(XMJSONPath.getJSONArrayByReadPath(dataApi.getApi_response(), "$.result").size() == 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