예제 #1
0
 public static CtrLogin getInstance()
 {
     if (umCtrLogin == null)
     {
         umCtrLogin = new CtrLogin();
     }
     return(umCtrLogin);
 }
예제 #2
0
        public string Login(string email, string password)
        {
            ctrLoginObj = new CtrLogin();

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

            return(ctrLoginObj.Login(email, password));
        }
예제 #3
0
        public void LoginExistingStudentIncorrectPassword()
        {
            CtrLogin ctrLoginObj = new CtrLogin();

            string expected = "Incorrect Password.";
            string actual   = ctrLoginObj.Login("*****@*****.**", "incorrectPassword").Trim();

            Assert.AreEqual(expected, actual);
        }
예제 #4
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());
        }