Exemplo n.º 1
0
        public void LoginExistingUserIncorrectPasswordTest()
        {
            bool actualResult = true;
            bool expectedResult = false;

            DbLogin dbLoginObj = new DbLogin();

            actualResult = dbLoginObj.Login("*****@*****.**", "defaultIncorrect");
            Assert.AreEqual(expectedResult, actualResult);
        }
Exemplo n.º 2
0
        public void LoginNonExistingUserTest()
        {
            bool actualResult = true;
            bool expectedResult = false;

            DbLogin dbLoginObj = new DbLogin();

            actualResult = dbLoginObj.Login("*****@*****.**", "default");
            Assert.AreEqual(expectedResult, actualResult);
        }
Exemplo n.º 3
0
 public string Login(string email, string password)
 {
     DbLogin dbLoginObj = new DbLogin();
     return dbLoginObj.Login(email, CreateHash(password.Trim(), dbLoginObj.GetSalt(email).Trim()));
 }