Skip to content

Commit

Permalink
🎨 优化单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
binarywang committed Jun 16, 2020
1 parent 2769f50 commit 1ae00b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void testUnifiedOrder() throws WxPayException {
request.setSignType(SignType.HMAC_SHA256);
WxPayUnifiedOrderResult result = this.payService.unifiedOrder(request);
log.info(result.toString());
// log.warn(this.payService.getWxApiData().toString());
log.warn(this.payService.getWxApiData().toString());
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package com.github.binarywang.wxpay.testbase;

import java.io.IOException;
import java.io.InputStream;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.github.binarywang.wxpay.config.WxPayConfig;
import com.github.binarywang.wxpay.service.WxPayService;
import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
import com.google.inject.Binder;
import com.google.inject.Module;
import com.thoughtworks.xstream.XStream;
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.io.InputStream;

/**
* The type Api test module.
Expand All @@ -29,6 +28,7 @@ public void configure(Binder binder) {
}

XmlWxPayConfig config = this.fromXml(XmlWxPayConfig.class, inputStream);
config.setIfSaveApiData(true);
WxPayService wxService = new WxPayServiceImpl();
wxService.setConfig(config);

Expand Down

0 comments on commit 1ae00b6

Please sign in to comment.