1
0
mirror of synced 2025-12-29 06:37:58 +08:00

优化部分代码

This commit is contained in:
Binary Wang
2018-01-27 18:39:37 +08:00
parent 5bd2d209db
commit 48d3163b33
13 changed files with 50 additions and 247 deletions

View File

@@ -1,18 +1,16 @@
package com.github.binarywang.wxpay.service.impl;
import com.github.binarywang.wxpay.bean.entpay.EntPayRequest;
import com.github.binarywang.wxpay.bean.entpay.EntPayBankRequest;
import com.github.binarywang.wxpay.bean.entpay.EntPayBankResult;
import com.github.binarywang.wxpay.bean.request.WxEntPayRequest;
import com.github.binarywang.wxpay.constant.WxPayConstants;
import com.github.binarywang.wxpay.bean.entpay.EntPayRequest;
import com.github.binarywang.wxpay.constant.WxPayConstants.CheckNameOption;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.github.binarywang.wxpay.testbase.ApiTestModule;
import com.google.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import org.testng.annotations.*;
/**
* <pre>
@@ -30,37 +28,20 @@ public class EntPayServiceImplTest {
@Inject
private WxPayService payService;
@Test
public void testEntPay_old() throws WxPayException {
this.logger.info(this.payService.entPay(WxEntPayRequest.builder()
.partnerTradeNo("Eb6Aep7uVTdbkJqrP4")
.openid("ojOQA0y9o-Eb6Aep7uVTdbkJqrP4")
.amount(1)
.spbillCreateIp("10.10.10.10")
.checkName(WxPayConstants.CheckNameOption.NO_CHECK)
.description("描述信息")
.build()).toString());
}
@Test
public void testEntPay() throws WxPayException {
EntPayRequest request = EntPayRequest.newBuilder()
.partnerTradeNo("Eb6Aep7uVTdbkJqrP4")
.openid("ojOQA0y9o-Eb6Aep7uVTdbkJqrP4")
.amount(1)
.openid("ojOQA0y9o-Eb6Aep7uVTdbkJqrP5")
.amount(100)
.spbillCreateIp("10.10.10.10")
.checkName(WxPayConstants.CheckNameOption.NO_CHECK)
.checkName(CheckNameOption.NO_CHECK)
.description("描述信息")
.build();
this.logger.info(this.payService.getEntPayService().entPay(request).toString());
}
@Test
public void testQueryEntPay_old() throws WxPayException {
this.logger.info(this.payService.queryEntPay("11212121").toString());
}
@Test
public void testQueryEntPay() throws WxPayException {
this.logger.info(this.payService.getEntPayService().queryEntPay("11212121").toString());