您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

LuUsersBusinessTest.cs 737B

12345678910111213141516171819202122
  1. using Luticate2.Auth.Interfaces.Users;
  2. using Xunit;
  3. namespace TestAuth.Business
  4. {
  5. public class LuUsersBusinessTest
  6. {
  7. [Fact]
  8. public void TestPassword()
  9. {
  10. Tests.TestRealDb<ILuUsersBusiness>(business =>
  11. {
  12. var password = "test42";
  13. var salt = business.GenerateSalt();
  14. var hashed = business.HashPassword(password, salt);
  15. Assert.True(business.VerifyPasswordHash(password, hashed, salt));
  16. Assert.False(business.VerifyPasswordHash(password + "0", hashed, salt));
  17. Assert.False(business.VerifyPasswordHash("0" + password, hashed, salt));
  18. });
  19. }
  20. }
  21. }