From 9acb01cd176cc299651208049912eb86afd20e41 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Fri, 24 Mar 2017 11:12:00 +0800 Subject: [PATCH] add test for reverseOdrer method --- .../binarywang/wxpay/config/WxPayConfig.java | 2 +- .../service/impl/WxPayServiceImplTest.java | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java index 56eba3ac..c03b2482 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java @@ -135,7 +135,7 @@ public class WxPayConfig { public SSLContext initSSLContext() { if (null == mchId) { - throw new IllegalArgumentException("请確保mchId已設置"); + throw new IllegalArgumentException("请确保商户号mch_id已设置"); } File file = new File(this.keyPath); diff --git a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/WxPayServiceImplTest.java b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/WxPayServiceImplTest.java index 6b4a0939..2bbc09e8 100644 --- a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/WxPayServiceImplTest.java +++ b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/WxPayServiceImplTest.java @@ -210,4 +210,23 @@ public class WxPayServiceImplTest { .build()); this.logger.info(result.toString()); } + + @Test + public void testGetConfig() throws Exception { + } + + @Test + public void testSetConfig() throws Exception { + } + + @Test + public void testReverseOrder() throws Exception { + WxPayOrderReverseResult result = this.payService.reverseOrder(WxPayOrderReverseRequest.newBuilder() + .outTradeNo("1111") + .build()); + assertNotNull(result); + this.logger.info(result.toString()); + + } + }