修复checkstyle检查出来的部分代码问题
This commit is contained in:
@@ -2,6 +2,7 @@ package com.github.binarywang.wxpay.service.impl;
|
||||
|
||||
import com.github.binarywang.utils.qrcode.QrcodeUtils;
|
||||
import com.github.binarywang.wxpay.bean.coupon.*;
|
||||
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
|
||||
import com.github.binarywang.wxpay.bean.order.WxPayAppOrderResult;
|
||||
import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
|
||||
import com.github.binarywang.wxpay.bean.order.WxPayNativeOrderResult;
|
||||
@@ -398,9 +399,43 @@ public class WxPayServiceAbstractImplTest {
|
||||
this.logger.info(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResultTest}
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void testParseOrderNotifyResult() throws Exception {
|
||||
// 请参考com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResultTest里的单元测试
|
||||
// 请参考com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResultTest 里的单元测试
|
||||
|
||||
String xmlString = "<xml>\n" +
|
||||
" <appid><![CDATA[wx2421b1c4370ec43b]]></appid>\n" +
|
||||
" <attach><![CDATA[支付测试]]></attach>\n" +
|
||||
" <bank_type><![CDATA[CFT]]></bank_type>\n" +
|
||||
" <fee_type><![CDATA[CNY]]></fee_type>\n" +
|
||||
" <is_subscribe><![CDATA[Y]]></is_subscribe>\n" +
|
||||
" <mch_id><![CDATA[10000100]]></mch_id>\n" +
|
||||
" <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e531c]]></nonce_str>\n" +
|
||||
" <openid><![CDATA[oUpF8uMEb4qRXf22hE3X68TekukE]]></openid>\n" +
|
||||
" <out_trade_no><![CDATA[1409811653]]></out_trade_no>\n" +
|
||||
" <result_code><![CDATA[SUCCESS]]></result_code>\n" +
|
||||
" <return_code><![CDATA[SUCCESS]]></return_code>\n" +
|
||||
" <sign><![CDATA[B552ED6B279343CB493C5DD0D78AB241]]></sign>\n" +
|
||||
" <sub_mch_id><![CDATA[10000100]]></sub_mch_id>\n" +
|
||||
" <time_end><![CDATA[20140903131540]]></time_end>\n" +
|
||||
" <total_fee>1</total_fee>\n" +
|
||||
" <trade_type><![CDATA[JSAPI]]></trade_type>\n" +
|
||||
" <transaction_id><![CDATA[1004400740201409030005092168]]></transaction_id>\n" +
|
||||
" <coupon_count>2</coupon_count>\n" +
|
||||
" <coupon_type_0><![CDATA[CASH]]></coupon_type_0>\n" +
|
||||
" <coupon_id_0>10000</coupon_id_0>\n" +
|
||||
" <coupon_fee_0>100</coupon_fee_0>\n" +
|
||||
" <coupon_type_1><![CDATA[NO_CASH]]></coupon_type_1>\n" +
|
||||
" <coupon_id_1>10001</coupon_id_1>\n" +
|
||||
" <coupon_fee_1>200</coupon_fee_1>\n" +
|
||||
"</xml>";
|
||||
|
||||
WxPayOrderNotifyResult result = this.payService.parseOrderNotifyResult(xmlString);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user