Example #1
0
        public void Test(string hash)
        {
            var sut  = new UserPasswordService();
            var user = new User
            {
                Password = hash
            };

            Assert.True(sut.ComparePassword(user, "123456"));
        }
Example #2
0
        public void HashPasswordAndTest()
        {
            var sut  = new UserPasswordService();
            var hash = sut.HashPassword("123456");

            Assert.NotEmpty(hash);
            var user = new User
            {
                Password = hash
            };

            Assert.True(sut.ComparePassword(user, "123456"));
        }