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.
KopSoftWms/test/XUnitTestKopSoftWms/SecurityTest.cs

25 lines
555 B

using AutoFixture.Xunit2;
using Xunit;
using YL.Utils.Security;
namespace XUnitTestKopSoftWms
{
public class SecurityTest
{
[Fact]
public void TestMethod1()
{
var str = "阿萨斯";
var sd = str.ToSha1();
Assert.Equal("55a10ac78972a76ee94d6be6bf00e2b2354b4f91", sd);
}
[Theory, AutoData]
public void TestMethod2(string str)
{
var sd = str.ToMd52();
var sd2 = str.ToMd5();
Assert.Equal(sd, sd2);
}
}
}