mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
pay模块批量添加缺失的javadoc文档
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
package com.github.binarywang.wxpay.bean.notify;
|
||||
|
||||
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
|
||||
import org.testng.*;
|
||||
import org.testng.annotations.*;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Created by Binary Wang on 2017-6-15.
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
*/
|
||||
public class WxPayOrderNotifyResultTest {
|
||||
/**
|
||||
* Test from xml.
|
||||
*/
|
||||
@Test
|
||||
public void testFromXML() {
|
||||
String xmlString = "<xml>\n" +
|
||||
|
||||
@@ -28,6 +28,11 @@ public class WxPayRefundNotifyResultTest {
|
||||
@Inject
|
||||
private WxPayConfig wxPayConfig;
|
||||
|
||||
/**
|
||||
* Test from xml.
|
||||
*
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
public void testFromXML() throws WxPayException {
|
||||
String xmlString = "<xml>" +
|
||||
"<return_code>SUCCESS</return_code>" +
|
||||
@@ -42,6 +47,11 @@ public class WxPayRefundNotifyResultTest {
|
||||
System.out.println(refundNotifyResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode req info.
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public void encodeReqInfo() throws Exception {
|
||||
String xml = "<root>\n" +
|
||||
"<out_refund_no><![CDATA[R4001312001201707262674894706_4]]></out_refund_no>\n" +
|
||||
|
||||
@@ -16,10 +16,16 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class WxScanPayNotifyResultTest {
|
||||
|
||||
/**
|
||||
* Test to map.
|
||||
*/
|
||||
@Test
|
||||
public void testToMap() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test from xml.
|
||||
*/
|
||||
@Test
|
||||
public void testFromXML() {
|
||||
String xmlString = "<xml>\n" +
|
||||
|
||||
@@ -1,26 +1,42 @@
|
||||
package com.github.binarywang.wxpay.bean.result;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.testng.*;
|
||||
import org.testng.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Created by Binary Wang on 2017-01-04.
|
||||
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
|
||||
*/
|
||||
public class BaseWxPayResultTest {
|
||||
|
||||
/**
|
||||
* Test get xml value.
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testGetXmlValue() throws Exception {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test xml 2 doc.
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testXml2Doc() throws Exception {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test to map.
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testToMap() throws Exception {
|
||||
WxPayOrderQueryResult result = new WxPayOrderQueryResult();
|
||||
@@ -53,6 +69,9 @@ public class BaseWxPayResultTest {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test to map with empty xml string.
|
||||
*/
|
||||
@Test(expectedExceptions = {RuntimeException.class})
|
||||
public void testToMap_with_empty_xmlString() {
|
||||
WxPayOrderQueryResult result = new WxPayOrderQueryResult();
|
||||
|
||||
@@ -6,10 +6,14 @@ import org.testng.annotations.*;
|
||||
/**
|
||||
* <pre>
|
||||
* Created by Binary Wang on 2017-01-04.
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
|
||||
* </pre>
|
||||
*/
|
||||
public class WxPayOrderQueryResultTest {
|
||||
/**
|
||||
* Test compose coupons.
|
||||
*/
|
||||
@Test
|
||||
public void testComposeCoupons() {
|
||||
/*
|
||||
|
||||
@@ -13,6 +13,9 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
*/
|
||||
public class WxPayRedpackQueryResultTest {
|
||||
/**
|
||||
* Test from xml.
|
||||
*/
|
||||
@Test
|
||||
public void testFromXML() {
|
||||
String xmlString = "<xml>\n" +
|
||||
|
||||
@@ -7,10 +7,16 @@ import org.testng.annotations.*;
|
||||
/**
|
||||
* <pre>
|
||||
* Created by Binary Wang on 2016-12-29.
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
|
||||
* </pre>
|
||||
*/
|
||||
public class WxPayRefundQueryResultTest {
|
||||
/**
|
||||
* Compose refund records.
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void composeRefundRecords() throws Exception {
|
||||
/*
|
||||
|
||||
@@ -13,6 +13,9 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class WxPayRefundResultTest {
|
||||
|
||||
/**
|
||||
* Test compose refund coupons.
|
||||
*/
|
||||
@Test
|
||||
public void testComposeRefundCoupons() {
|
||||
/*
|
||||
|
||||
@@ -1,20 +1,30 @@
|
||||
package com.github.binarywang.wxpay.bean.result;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
|
||||
import org.testng.*;
|
||||
import org.testng.annotations.*;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
|
||||
|
||||
/**
|
||||
* The type Wx pay send redpack result test.
|
||||
*/
|
||||
public class WxPaySendRedpackResultTest {
|
||||
|
||||
private XStream xstream;
|
||||
|
||||
/**
|
||||
* Sets .
|
||||
*/
|
||||
@BeforeTest
|
||||
public void setup() {
|
||||
this.xstream = XStreamInitializer.getInstance();
|
||||
this.xstream.processAnnotations(WxPaySendRedpackResult.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load success result.
|
||||
*/
|
||||
@Test
|
||||
public void loadSuccessResult() {
|
||||
final String successSample = "<xml>\n" +
|
||||
@@ -37,6 +47,9 @@ public class WxPaySendRedpackResultTest {
|
||||
Assert.assertEquals("20150520102602", wxMpRedpackResult.getSendTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* Load failure result.
|
||||
*/
|
||||
@Test
|
||||
public void loadFailureResult() {
|
||||
final String failureSample = "<xml>\n" +
|
||||
|
||||
Reference in New Issue
Block a user