Ejemplo n.º 1
0
        public void LoginNonExistingStudent()
        {
            CtrLogin ctrLoginObj = new CtrLogin();

            string expected = "Incorrect Email.";
            string actual = ctrLoginObj.Login("*****@*****.**", "password").Trim();
            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void LoginExistingStudent()
        {
            CtrLogin ctrLoginObj = new CtrLogin();
            CtrStudent ctrStudentObj = new CtrStudent();

            MdlStudent mdlStudentObj = GenerateStudentObj();
            mdlStudentObj.Email = "*****@*****.**";
            ctrStudentObj.AddStudent(mdlStudentObj).Trim();

            string expected = "You have successfully logged in.";
            string actual = ctrLoginObj.Login(mdlStudentObj.Email, "myPassword");
            Assert.AreEqual(expected, actual.Trim());
        }
Ejemplo n.º 3
0
        public string Login(string email, string password)
        {
            ctrLoginObj = new CtrLogin();

             Console.WriteLine();
             Console.WriteLine("Login() " + GetExecutionThreadTime());

             return ctrLoginObj.Login(email, password);
        }