You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
812 B
26 lines
812 B
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using Senparc.Weixin.HttpUtility;
|
|
using Senparc.Weixin.Open.OAuthAPIs;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Senparc.Weixin.Open.OAuthAPIs.Tests
|
|
{
|
|
[TestClass()]
|
|
public class OAuthApiTests
|
|
{
|
|
[TestMethod()]
|
|
public void GetAuthorizeUrlTest()
|
|
{
|
|
var returnUrl = "https://sdk.weixin.senparc.com?a=1&b=a";
|
|
var result = OAuthAPIs.OAuthApi.GetAuthorizeUrl("appId", "componentAppId", returnUrl, "Jeffrey Su", new[] { OAuthScope.snsapi_userinfo });
|
|
|
|
Console.WriteLine(result);
|
|
Assert.IsTrue(result.Contains("redirect_uri=http%3A%2F%2Fsdk.weixin.senparc.com%3Fa%3D1%26b%3Da"));
|
|
|
|
}
|
|
}
|
|
} |