Skip to content

Commit

Permalink
完善单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreySu committed Aug 24, 2021
1 parent d081d06 commit 90ebb84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ public void CreatePaySignTest()
var timestamp = "1414561699";
var nonceStr = "5K8264ILTKCH16CQ2502SI8ZNMTM67VS";

var separcWeixinSetting = Config.SenparcWeixinSetting.TenpayV3Setting;
var separcWeixinSetting = Config.SenparcWeixinSetting with
{
TenPayV3_AppId = appId,
TenPayV3_PrivateKey = privateKey
};

var result = TenPaySignHelper.CreatePaySign(timestamp, nonceStr, package, appId, privateKey);
var result = TenPaySignHelper.CreatePaySign(timestamp, nonceStr, package, separcWeixinSetting);
Assert.IsNotNull(result);

var exceptedResult = "POmTZCzk7fj+FeSwbU4rNghygFOzwpoaQt9SBW8blDAPZCVJ7wVnDVisx6t1ryyBpB3NmOwiNaT+hHi7YthYZzr0kvL5kWKSnpssyWBofnjqbFWBSV8JaFx7Ia2qnsgdVYALisYjLBr+bj69YXuyWiBxYFx+JylH6wW4w55Rziatoa4rwrdlrpgE2yRTxDu9wSZ4VCdUYSMj2ctyAy2fOiCcP00VGjihJWGCXXjeVm2YQyFZXB7KqGPhncdHaFmJzIvL8SbWKSc36cUKSuHhZ5n+oZVU8Vf+lb/eJibzTWxBIAJbtQplKojG48ukd7QFtRUd3b2EkOjzmeJ26zMlfA==";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFrameworks>net45;netstandard2.0;netstandard2.1</TargetFrameworks>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(Net35FrameworkPathOverride)</FrameworkPathOverride>
<Version>6.12.0-preview1</Version>
<LangVersion>lastest</LangVersion>
<LangVersion>preview</LangVersion>
<AssemblyName>Senparc.Weixin</AssemblyName>
<RootNamespace>Senparc.Weixin</RootNamespace>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
Expand Down

0 comments on commit 90ebb84

Please sign in to comment.