File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ public void configure(Binder binder) {
31
31
}
32
32
}
33
33
34
+ @ SuppressWarnings ("unchecked" )
34
35
public static <T > T fromXml (Class <T > clazz , InputStream is ) {
35
36
XStream xstream = XStreamInitializer .getInstance ();
36
37
xstream .alias ("xml" , clazz );
Original file line number Diff line number Diff line change 1
1
package me .chanjar .weixin .mp .api .impl ;
2
2
3
+ import org .testng .Assert ;
3
4
import org .testng .annotations .Guice ;
4
5
import org .testng .annotations .Test ;
5
6
9
10
import me .chanjar .weixin .mp .api .ApiTestModule ;
10
11
import me .chanjar .weixin .mp .api .ApiTestModule .WxXmlMpInMemoryConfigStorage ;
11
12
12
- import org .testng .Assert ;
13
-
14
13
@ Test
15
14
@ Guice (modules = ApiTestModule .class )
16
15
public class WxMpServiceImplTest {
@@ -110,11 +109,9 @@ public void testOauth2buildAuthorizationUrl() {
110
109
111
110
@ Test
112
111
public void testBuildQrConnectUrl () {
113
- String qrConnectUrl = this .wxService
114
- .buildQrConnectUrl (
115
- ((WxXmlMpInMemoryConfigStorage ) this .wxService
116
- .getWxMpConfigStorage ()).getOauth2redirectUri (),
117
- WxConsts .QRCONNECT_SCOPE_SNSAPI_LOGIN , null );
112
+ String qrconnectRedirectUrl = ((WxXmlMpInMemoryConfigStorage ) this .wxService .getWxMpConfigStorage ()).getQrconnectRedirectUrl ();
113
+ String qrConnectUrl = this .wxService .buildQrConnectUrl (qrconnectRedirectUrl ,
114
+ WxConsts .QRCONNECT_SCOPE_SNSAPI_LOGIN , null );
118
115
Assert .assertNotNull (qrConnectUrl );
119
116
System .out .println (qrConnectUrl );
120
117
}
You can’t perform that action at this time.
0 commit comments