예제 #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>
 /// 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));
 }