Ejemplo n.º 1
0
        public void UpdateLoginCtrFailNull()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = lCtr.Login(null);

            Assert.IsNull(login);
        }
Ejemplo n.º 2
0
        public void LoginLoginCtrFailBoth()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = new Login("", "");

            login = lCtr.Login(login);
            Assert.IsNull(login);
        }
Ejemplo n.º 3
0
        public void LoginLoginCtrFailPassword()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = new Login("Admin", "");

            login = lCtr.Login(login);
            Assert.IsNull(login);
        }
Ejemplo n.º 4
0
        public void LoginLoginCtrFailUsername()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = new Login("", "SuperAdmin");

            login = lCtr.Login(login);
            Assert.IsNull(login);
        }
Ejemplo n.º 5
0
        public void LoginLoginCtr()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = new Login("Admin", "SuperAdmin");

            login = lCtr.Login(login);
            Assert.IsNotNull(login);
        }
Ejemplo n.º 6
0
 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);
     }
 }
Ejemplo n.º 7
0
 /// <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());
 }
Ejemplo n.º 8
0
 /// <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));
 }
Ejemplo n.º 9
0
        public void LoginCtrInitialize()
        {
            var loginCtr = new LoginCtr(new LoginCtrTestClass());

            Assert.IsNotNull(loginCtr);
        }