Commit 1f28a2e2 by xuyamei

解决报错

parent 2755c53f
...@@ -9,7 +9,7 @@ import com.xiaomai.enums.LoginAccount; ...@@ -9,7 +9,7 @@ import com.xiaomai.enums.LoginAccount;
import com.xiaomai.enums.RequestType; import com.xiaomai.enums.RequestType;
import com.xiaomai.enums.Terminal; import com.xiaomai.enums.Terminal;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -30,7 +30,7 @@ public class TestCreateBatchNormalDate extends BaseTestImpl { ...@@ -30,7 +30,7 @@ public class TestCreateBatchNormalDate extends BaseTestImpl {
JSONArray coachIds = new JSONArray(); JSONArray coachIds = new JSONArray();
@BeforeClass @BeforeMethod
@Override @Override
public void beforeTest(){ public void beforeTest(){
setTestInfo(ApiModule.Polar_Reserve,"API_createBatchNormalDate", LoginAccount.GYM_PROD, Terminal.B,"xym"); setTestInfo(ApiModule.Polar_Reserve,"API_createBatchNormalDate", LoginAccount.GYM_PROD, Terminal.B,"xym");
......
...@@ -10,7 +10,6 @@ import com.xiaomai.enums.RequestType; ...@@ -10,7 +10,6 @@ import com.xiaomai.enums.RequestType;
import com.xiaomai.enums.Terminal; import com.xiaomai.enums.Terminal;
import com.xiaomai.utils.TimeUtils; import com.xiaomai.utils.TimeUtils;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test; import org.testng.annotations.Test;
...@@ -103,7 +102,25 @@ public class TestCreateBatchSpecialDate extends BaseTestImpl { ...@@ -103,7 +102,25 @@ public class TestCreateBatchSpecialDate extends BaseTestImpl {
} }
@Test(description = "设置特定日期全天休息",priority = 1) @Test(description = "删除特殊日期",priority = 1)
public void testDeleteSpecialDate1() {
for (int j = 0; j < coachIds.size(); j++){
// 查询特殊可约时间列表
JSONArray specialTimeVOS = reserveTools.getPersonalCoachTime(coachIds.getString(j),"specialTimeVOS");
for (int i = 0; i < specialTimeVOS.size(); i++){
String id = specialTimeVOS.getJSONObject(i).getJSONArray("recordIds").getString(0);
// 删除查询到的特殊可约时间
reserveTools.deleteSpecialDate(id);
}
specialTimeVOS = reserveTools.getPersonalCoachTime(xmAppApi.getLoginInfo().getAdminId(),"specialTimeVOS");
Assert.assertEquals(specialTimeVOS.size(),0,"删除特殊日期后,特殊日期列表不为空");
}
}
@Test(description = "设置特定日期全天休息",priority = 2)
public void testCreateBatchSpecialDate2() { public void testCreateBatchSpecialDate2() {
// 获取教练列表 // 获取教练列表
JSONObject pageStudioPersonalCoach = reserveTools.pageStudioPersonalCoach(""); JSONObject pageStudioPersonalCoach = reserveTools.pageStudioPersonalCoach("");
...@@ -162,7 +179,7 @@ public class TestCreateBatchSpecialDate extends BaseTestImpl { ...@@ -162,7 +179,7 @@ public class TestCreateBatchSpecialDate extends BaseTestImpl {
} }
@Test(description = "删除特殊日期",priority = 2) @Test(description = "删除特殊日期",priority = 3)
public void testDeleteSpecialDate() { public void testDeleteSpecialDate() {
for (int j = 0; j < coachIds.size(); j++){ for (int j = 0; j < coachIds.size(); j++){
// 查询特殊可约时间列表 // 查询特殊可约时间列表
......
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