Commit c0a8259e authored by 张慧锋's avatar 张慧锋

注释优惠券付费

parent 8cb87fa7
...@@ -115,35 +115,35 @@ public class Pay { ...@@ -115,35 +115,35 @@ public class Pay {
Assert.assertEquals(userVersion,changeVersion,network.message(params, VERSION_INFO,"会员类型版本判断:判断错误,此版本为尊享版",response.body().asString())); Assert.assertEquals(userVersion,changeVersion,network.message(params, VERSION_INFO,"会员类型版本判断:判断错误,此版本为尊享版",response.body().asString()));
} }
@Test (description = "优惠券付费",priority = 5) // @Test (description = "优惠券付费",priority = 5)
public void 优惠券付费 () throws IOException { // public void 优惠券付费 () throws IOException {
String promotionCode = BaseUtils.getPromotionCode(); // String promotionCode = BaseUtils.getPromotionCode();
Map<String, Object> params = new HashMap<String, Object>(); // Map<String, Object> params = new HashMap<String, Object>();
params.put("code",promotionCode); // params.put("code",promotionCode);
Response response = network.getResponse(params,PAY_COMBOLIST); // Response response = network.getResponse(params,PAY_COMBOLIST);
//
Map<String, Object> payParams = new HashMap<String, Object>(); // Map<String, Object> payParams = new HashMap<String, Object>();
payParams.put("userVersion",2); // 1 通用版 2 保险版 // payParams.put("userVersion",2); // 1 通用版 2 保险版
payParams.put("comboId","Kj21MTU"); // payParams.put("comboId","Kj21MTU");
payParams.put("oaId","1"); // payParams.put("oaId","1");
payParams.put("paySource","101004"); // payParams.put("paySource","101004");
payParams.put("sellerFrom",""); // payParams.put("sellerFrom","");
payParams.put("promotionCode",promotionCode); // payParams.put("promotionCode",promotionCode);
//
response = network.postResponse(payParams,PAY_ORDERCREATE); // response = network.postResponse(payParams,PAY_ORDERCREATE);
String tradeNo = response.jsonPath().getString("data.tradeNo"); // String tradeNo = response.jsonPath().getString("data.tradeNo");
response.body().prettyPrint(); // response.body().prettyPrint();
//
// mock微信回调成功 // // mock微信回调成功
Map<String, Object> callbackParams = new HashMap<String, Object>(); // Map<String, Object> callbackParams = new HashMap<String, Object>();
callbackParams.put("tradeNo",tradeNo); // callbackParams.put("tradeNo",tradeNo);
callbackParams.put("payResult",true); // callbackParams.put("payResult",true);
callbackParams.put("payTradeNo","test"); // callbackParams.put("payTradeNo","test");
response = network.getResponse(callbackParams,PAY_CALLOUT); // response = network.getResponse(callbackParams,PAY_CALLOUT);
boolean result = response.jsonPath().getBoolean("data"); // boolean result = response.jsonPath().getBoolean("data");
response.body().prettyPrint(); // response.body().prettyPrint();
Assert.assertTrue(result,network.message(callbackParams,PAY_CALLOUT,"mock微信支付回调成功,但我们订单处理失败",response.body().asString())); // Assert.assertTrue(result,network.message(callbackParams,PAY_CALLOUT,"mock微信支付回调成功,但我们订单处理失败",response.body().asString()));
} // }
@Test (description = "默认付费_微信支付后回调",priority = 6) @Test (description = "默认付费_微信支付后回调",priority = 6)
public void 默认付费_微信支付后回调() throws IOException { public void 默认付费_微信支付后回调() throws IOException {
......
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