public void UpdateLoginCtrFailNull() { var lCtr = new LoginCtr(new DbLogin()); var login = lCtr.Login(null); Assert.IsNull(login); }
public void LoginLoginCtrFailBoth() { var lCtr = new LoginCtr(new DbLogin()); var login = new Login("", ""); login = lCtr.Login(login); Assert.IsNull(login); }
public void LoginLoginCtrFailPassword() { var lCtr = new LoginCtr(new DbLogin()); var login = new Login("Admin", ""); login = lCtr.Login(login); Assert.IsNull(login); }
public void LoginLoginCtrFailUsername() { var lCtr = new LoginCtr(new DbLogin()); var login = new Login("", "SuperAdmin"); login = lCtr.Login(login); Assert.IsNull(login); }
public void LoginLoginCtr() { var lCtr = new LoginCtr(new DbLogin()); var login = new Login("Admin", "SuperAdmin"); login = lCtr.Login(login); Assert.IsNotNull(login); }
public void UpdateLoginWcfFailNull() { using (var proxy = new BestilNemtServiceRef.BestilNemtServiceClient()) { proxy.Open(); var lCtr = new LoginCtr(new DbLogin()); var login = lCtr.Login(null); Assert.IsNull(login); } }
/// <summary> /// Login with a login object /// </summary> /// <param name="login"></param> /// <returns> /// Login object if login was correct, else null /// </returns> public Login Login(Login login) { return(LoginCtr.Login(login)); }