File tree Expand file tree Collapse file tree
weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ public void configure(Binder binder) {
3131 }
3232 }
3333
34+ @ SuppressWarnings ("unchecked" )
3435 public static <T > T fromXml (Class <T > clazz , InputStream is ) {
3536 XStream xstream = XStreamInitializer .getInstance ();
3637 xstream .alias ("xml" , clazz );
Original file line number Diff line number Diff line change 11package me .chanjar .weixin .mp .api .impl ;
22
3+ import org .testng .Assert ;
34import org .testng .annotations .Guice ;
45import org .testng .annotations .Test ;
56
910import me .chanjar .weixin .mp .api .ApiTestModule ;
1011import me .chanjar .weixin .mp .api .ApiTestModule .WxXmlMpInMemoryConfigStorage ;
1112
12- import org .testng .Assert ;
13-
1413@ Test
1514@ Guice (modules = ApiTestModule .class )
1615public class WxMpServiceImplTest {
@@ -110,11 +109,9 @@ public void testOauth2buildAuthorizationUrl() {
110109
111110 @ Test
112111 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 );
118115 Assert .assertNotNull (qrConnectUrl );
119116 System .out .println (qrConnectUrl );
120117 }
You can’t perform that action at this time.
0 commit comments