示例#1
0
        public void Should_Cryptograph_Password_And_Generate_Salt()
        {
            var user = new User();
            user.Password = "******";
            user.CryptographPasswordAndGenerateSalt();

            Assert.IsTrue(!string.IsNullOrEmpty(user.Password));
            Assert.IsTrue(!string.IsNullOrEmpty(user.Salt));
        }
示例#2
0
 public void Should_Thows_Exception_When_Try_Cryptograph_Password_And_Generate_Salt_With_Empty_Password()
 {
     var user = new User();
     user.Password = string.Empty;
     user.CryptographPasswordAndGenerateSalt();
 }