3rd post

this is my third post! 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
public void queryShopList() throws Exception { String session3rd = getSession3rd(); Map<String, String> head = new HashMap<>(); head.put("session3rd", session3rd); head.put("v", "100"); HttpHeaders httpHeaders = TestHeadUtil.getHttpHeaders(); httpHeaders.set("openId", "ossjE5VyWgsU-QcNKO_3OfpBNG3c"); httpHeaders.set("appType", "nft"); httpHeaders.set("v", "100"); httpHeaders.set("session3rd", session3rd); Map<String, String> bean = new HashMap<>(); bean.put("session3rd", session3rd); bean.put("couponId", "207504"); bean.put("lat", "23.12463"); bean.put("lng", "113.36199"); bean.put("limit", "10"); bean.put("page", "1"); // bean.put("data", "45FD95D0B7A233898C8ECA775042ECCC0860525875BB738A030389B0C3E9B7CBEB3A4B6636CC9732057434FFC32D11186E2C4176B84B06904D122E0400692CFBB24115ACB1F6DB7755CF5AAC1F7F1B95C9D8A398867DFFC45B6DC6274E154D8E7FDD34A9E11558D9AE161ECC8DF808377429A850FB48344FFC7000E3ED1257F2D3B565E5ED39AA67CFDE867C02DE9614341A3E55F52391D5B50834BD00B05C16"); // String content = RequestUtil.getEncodeParam(session, bean); String content = JSONObject.toJSONString(bean); ResultActions resultActions = mvc.perform(MockMvcRequestBuilders.post("/api/yiqilaiCoupon/coupon/queryShopList") .content(content).contentType(MediaType.APPLICATION_JSON) //.contentType(MediaType.TEXT_PLAIN) .headers(httpHeaders)) .andExpect(status().isOk()); resultActions.andReturn().getResponse().setCharacterEncoding("UTF-8"); String json = resultActions.andDo(print()).andReturn().getResponse().getContentAsString(); assert JSONObject.parseObject(json).getIntValue("result") == 0; }
06-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值