断言常用合集

激励视频-3-乌合之众
https://ad-raccoon-web–box-11992–www-zhihu-com.zpres.zhihu.com/tardis/zm/vip?plugin=carr%253D1%2526chl%253D1002%2526ctid%253D175322522%2526did%253D437bcc79e899862a%2526dt%253Doaid%2526os%253D2%2526osv%253D8.1.0%2526pi%253D4%2526ri%253D1e496c95-9b01-440d-8c5d-af61018f1b33%2526si%253Ddac5d6ed-5fa1-48f0-970e-50a8a5b3aac3&id=185679663&type=2

public void testGetModifyContentOfferEndTime() {
Response response = pu.getModifyContentOfferEndTime();
Assert.assertNotNull(response);
Assert.assertEquals(response.code(), 200);
Assert.assertNotNull(response.body().get(“data”));
Assert.assertTrue(response.body().get(“is_success”).asBoolean());
JsonNode data = response.body().get(“data”);
Assert.assertTrue(data.asLong() > 0);
Assert.assertNotNull(response.body().get(“data”).get(“postil_json”));
}
@Description(“获取 PU 内容报价列表”)
public void testGetContentOfferList() {
Response response = pu.getContentOfferList(1, 10);
Assert.assertNotNull(response.body().get(“data”));
Assert.assertTrue(response.body().get(“is_success”).asBoolean());
JsonNode data = response.body().get(“data”);
Assert.assertEquals(data.findValues(“id”).size(), 10);

    JsonNode offer = data.get(0);
    Assert.assertTrue(offer.get("id").asLong() > 0);
    Assert.assertTrue(offer.get("content_id").asLong() > 0);
    Assert.assertTrue(offer.get("member_id").asLong() > 0);
    Assert.assertTrue(offer.get("content_type").asLong() > 0);
    Assert.assertTrue(StringUtils.isNotEmpty(offer.get("content_title").asText()));
    Assert.assertTrue(StringUtils.isNotEmpty(offer.get("content_link").asText()));
    Assert.assertTrue(offer.get("content_created_time").asLong() > 0);
    Assert.assertTrue(offer.get("up_vote_count").asLong() > 0);
    Assert.assertTrue(offer.get("cooperation").asLong() > 0);
    Assert.assertTrue(offer.get("suggest_price").asLong() > 0);
    Assert.assertTrue(offer.get("modify_price").asLong() > 0);
    Assert.assertTrue(offer.get("update_time").asLong() > 0);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值