Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

测试友好 #196

Closed
ericx10ng opened this issue Oct 22, 2016 · 1 comment
Closed

测试友好 #196

ericx10ng opened this issue Oct 22, 2016 · 1 comment

Comments

@ericx10ng
Copy link

现在在搞支付,要用到pay相关部份,现在的代码不太方便测试,发请求都用了具体类型core.Client,而且url也写死在代码里, 没办法mock一个,如果是接口就好,总不能测试就去请求微信那边吧

@chanxuehong
Copy link
Owner

不好意思,现在比较忙,才看到你这个!

对于你的建议, 如果 client 用接口代替也不能解决问题, 其实那些方法也是 client 的 PostXML 的一个简单封装, 如果你想弄两套环境, 可以直接用 Client.PostXML 的方法, 不要用 wrapper 方法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants