DotNetCore.SKIT.FlurlHttpCl.../test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/TestCase_ToolsHashUtilityTests.cs
2023-03-09 18:15:49 +08:00

19 lines
552 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Xunit;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
{
public class TestCase_ToolsHashUtilityTests
{
[Fact(DisplayName = "测试用例SHA-256 信息摘要")]
public void TestSHA256Hash()
{
string rawData = "SHA256HashTest";
string actualHash = Utilities.SHA256Utility.Hash(rawData);
string expectedHash = "8446f1ce5ca8b4a87c0d0cc15be4ba173b2ff78dc33c5f6731d877dcd2d8f401";
Assert.Equal(expectedHash, actualHash, ignoreCase: true);
}
}
}