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.

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. }