Commit 0acd24e4 authored by 赵然's avatar 赵然

Merge branch 'develop'

parents d423bba5 663e8c3e
......@@ -18,7 +18,7 @@ import java.util.Map;
/**
* Created by mabo on 2018/8/15
*/
public class 种红包发券 extends DuibaTestBase{
public class 种红包配置校验_AccessTest extends DuibaTestBase{
@Autowired
SeedRedPacketService seedRedPacketService;
......@@ -40,10 +40,25 @@ public class 种红包发券 extends DuibaTestBase{
String adPositions = response.jsonPath().getString("data.adPositions");
String adSwitch = response.jsonPath().getString("data.adSwitch");
String drawNumDaily = response.jsonPath().getString("data.drawNumDaily");
String decrBeginTime = response.jsonPath().getString("data.decrBeginTime");
String decrSwitch = response.jsonPath().getString("data.decrSwitch");
String seedCreditsPrice = response.jsonPath().getString("data.seedCreditsPrice");
String stealRedPacketSwitch = response.jsonPath().getString("data.stealRedPacketSwitch");
String unlockLandCreditsPrice = response.jsonPath().getString("data.unlockLandCreditsPrice");
Assert.assertEquals(adPositions,"1,2,3","发券位置校验异常");
Assert.assertEquals(adSwitch,"true","种红包开关校验异常");
Assert.assertEquals(adSwitch,"true","种红包发券开关校验异常");
Assert.assertEquals(drawNumDaily,"20","每日中奖个数校验异常");
Assert.assertEquals(decrSwitch,"true","种红包衰减开关校验异常");
Assert.assertEquals(decrBeginTime,"1","衰减时间校验异常");
Assert.assertEquals(seedCreditsPrice,"1","种红包种植单价校验异常");
Assert.assertEquals(stealRedPacketSwitch,"false","偷红包开关校验异常");
Assert.assertEquals(unlockLandCreditsPrice,"300","解锁土地所需积分校验异常");
logger.info("种红包的红包配置接口校验正确");
}
@Test
......@@ -52,11 +67,18 @@ public class 种红包发券 extends DuibaTestBase{
Map cookies = authorization.dafuwengLogin(uid2);
//校验种红包配置
Response response = seedRedPacketService.getExtConfig(cookies);
response.prettyPrint();
String adPositions = response.jsonPath().getString("data.adPositions");
String adSwitch = response.jsonPath().getString("data.adSwitch");
String decrBeginTime = response.jsonPath().getString("data.decrBeginTime");
String decrSwitch = response.jsonPath().getString("data.decrSwitch");
Assert.assertNull(adPositions,"发券位置校验异常");
Assert.assertEquals(adSwitch,"false","种红包开关校验异常");
Assert.assertEquals(decrSwitch,"false","种红包衰减开关校验异常");
Assert.assertNull(decrBeginTime,"衰减时间校验异常");
logger.info("种红包的红包配置接口校验正确");
}
}
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