1
0
mirror of synced 2025-12-23 10:39:27 +08:00

xml代码优化

This commit is contained in:
Binary Wang
2018-11-12 11:27:14 +08:00
parent 1160209ec2
commit 0d7ea29652
4 changed files with 41 additions and 46 deletions

View File

@@ -13,11 +13,8 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class WxPayRefundResultTest {
/**
* Test compose refund coupons.
*/
@Test
public void testComposeRefundCoupons() {
public void testFromXML() {
/*
该xml字符串来自于官方文档示例稍加改造加上代金卷
refund_channel 是个什么鬼,官方文档只字不提
@@ -43,8 +40,7 @@ public class WxPayRefundResultTest {
" <refund_fee>2</refund_fee> \n" +
"</xml>";
WxPayRefundResult result = WxPayRefundResult.fromXML(xmlString, WxPayRefundResult.class);
result.composeRefundCoupons();
WxPayRefundResult result = WxPayRefundResult.fromXML(xmlString);
assertThat(result.getRefundCoupons()).isNotEmpty();
assertThat(result.getRefundCoupons().get(0).getCouponRefundId()).isEqualTo("123");