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> /// Initialize all Controllers /// </summary> public BestilNemtService() { LoginCtr = new LoginCtr(new DbLogin()); CustomerCtr = new CustomerCtr(new DbCustomer()); ShopController = new ShopCtr(new DbShop()); ChainCtr = new ChainCtr(new DbChain()); AdminCtr = new AdminCtr(new DbAdmin()); ProductCtr = new ProductCtr(new DbProduct()); CartCtr = new CartCtr(new DbCart()); PartOrderCtr = new PartOrderCtr(new DbPartOrder()); SavingCtr = new SavingCtr(new DbSaving()); WarehouseCtr = new WarehouseCtr(new DbWarehouse()); }
/// <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)); }
public void LoginCtrInitialize() { var loginCtr = new LoginCtr(new LoginCtrTestClass()); Assert.IsNotNull(loginCtr); }