Пример #1
0
        public void UpdateLoginCtrFailNull()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = lCtr.Login(null);

            Assert.IsNull(login);
        }
Пример #2
0
        public void LoginLoginCtrFailBoth()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = new Login("", "");

            login = lCtr.Login(login);
            Assert.IsNull(login);
        }
Пример #3
0
        public void LoginLoginCtrFailPassword()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = new Login("Admin", "");

            login = lCtr.Login(login);
            Assert.IsNull(login);
        }
Пример #4
0
        public void LoginLoginCtrFailUsername()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = new Login("", "SuperAdmin");

            login = lCtr.Login(login);
            Assert.IsNull(login);
        }
Пример #5
0
        public void LoginLoginCtr()
        {
            var lCtr  = new LoginCtr(new DbLogin());
            var login = new Login("Admin", "SuperAdmin");

            login = lCtr.Login(login);
            Assert.IsNotNull(login);
        }
Пример #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);
     }
 }
Пример #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());
 }
Пример #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));
 }
Пример #9
0
        public void LoginCtrInitialize()
        {
            var loginCtr = new LoginCtr(new LoginCtrTestClass());

            Assert.IsNotNull(loginCtr);
        }