public static CtrLogin getInstance() { if (umCtrLogin == null) { umCtrLogin = new CtrLogin(); } return(umCtrLogin); }
public string Login(string email, string password) { ctrLoginObj = new CtrLogin(); Console.WriteLine(); Console.WriteLine("Login() " + GetExecutionThreadTime()); return(ctrLoginObj.Login(email, password)); }
public void LoginExistingStudentIncorrectPassword() { CtrLogin ctrLoginObj = new CtrLogin(); string expected = "Incorrect Password."; string actual = ctrLoginObj.Login("*****@*****.**", "incorrectPassword").Trim(); Assert.AreEqual(expected, actual); }
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()); }