🎨 优化代码,增加单元测试

This commit is contained in:
Binary Wang 2020-03-23 17:08:56 +08:00
parent c15384ff8d
commit bb12cce0b8
2 changed files with 54 additions and 3 deletions

View File

@ -2,6 +2,7 @@ package com.github.binarywang.wxpay.bean.request;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.*;
import lombok.experimental.Accessors;
import me.chanjar.weixin.common.annotation.Required;
import java.util.Map;
@ -16,12 +17,14 @@ import java.util.Map;
* @author <a href="https://github.com/jmdhappy/xxpay-master">XxPay</a>
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Builder(builderMethodName = "newBuilder")
@NoArgsConstructor
@AllArgsConstructor
@XStreamAlias("xml")
public class WxPayFaceAuthInfoRequest extends BaseWxPayRequest {
private static final long serialVersionUID = -2909189635374300870L;
/**
* <pre>

View File

@ -20,8 +20,6 @@ import com.github.binarywang.wxpay.testbase.XmlWxPayConfig;
import com.github.binarywang.wxpay.util.XmlConfig;
import com.google.inject.Inject;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@ -619,10 +617,60 @@ public class BaseWxPayServiceImplTest {
}
@Test
public void testGetWxPayFaceAuthInfo() {
public void testGetWxPayFaceAuthInfo() throws WxPayException {
XmlConfig.fastMode = true;
final WxPayFaceAuthInfoRequest request = new WxPayFaceAuthInfoRequest()
.setStoreId("1").setRawdata("111").setNow("111").setVersion("111").setStoreName("2222").setDeviceId("111");
request.setSignType("MD5");
this.payService.getWxPayFaceAuthInfo(request);
}
@Test
public void testFacepay() {
}
@Test
public void testGetEntPayService() {
// no need to test
}
@Test
public void testGetProfitSharingService() {
// no need to test
}
@Test
public void testGetRedpackService() {
// no need to test
}
@Test
public void testSetEntPayService() {
// no need to test
}
@Test
public void testGetPayBaseUrl() {
// no need to test
}
@Test
public void testParseScanPayNotifyResult() {
}
@Test
public void testSendMiniProgramRedpack() {
}
@Test
public void testSendRedpack() {
}
@Test
public void testQueryRedpack() {
}
@Test
public void testTestQueryRedpack() {
}
}