예제 #1
0
 public SearchPage(SearchService service)
 {
     InitializeComponent();
     context      = new PhoneContext();
     this.service = service;
     vService     = new ValidationServise();
 }
예제 #2
0
 public ViewRedactionPage()
 {
     InitializeComponent();
     context  = new PhoneContext();
     vServise = new ValidationServise(errorLabel);
     service  = new RedactionService(context);
 }
예제 #3
0
 public SearchPage()
 {
     InitializeComponent();
     context  = new PhoneContext();
     service  = new SearchService(context);
     vService = new ValidationServise();
 }
        public void LoginValidation_MoreLength_ReturnFalse()
        {
            ValidationServise service = new ValidationServise();
            bool result = service.LoginValidation("123456789012345678901", new Label(), new Label(), 10);

            Assert.IsFalse(result);
        }
        public void LoginValidation_ValidLength_ReturnTrue()
        {
            ValidationServise service = new ValidationServise();
            bool result = service.LoginValidation("login", new Label(), new Label(), 10);

            Assert.IsTrue(result);
        }
        public void SearchLineValid_NullLength_ReturnFalse()
        {
            ValidationServise service = new ValidationServise();
            bool result = service.SearchLineValid("", new Label());

            Assert.IsFalse(result);
        }
        public void LoginValidation_LessLength_ReturnFalse()
        {
            ValidationServise service = new ValidationServise();
            bool result = service.LoginValidation("a", new Label(), new Label(), 10);

            Assert.IsFalse(result);
        }
        public void SearchLineValid_ValidLength_ReturnTrue()
        {
            ValidationServise service = new ValidationServise();
            bool result = service.SearchLineValid("123456", new Label());

            Assert.IsTrue(result);
        }
        public void СanEnter_NotValidLogin_NotValidPassword_ReturnFalse()
        {
            ValidationServise service = new ValidationServise();
            bool result = service.СanEnter("adminn", "adminn", new Label(), 10);

            Assert.IsFalse(result);
        }
        public void PasswordValidation_NullLength_ReturnFalse()
        {
            ValidationServise service = new ValidationServise();
            bool result = service.PasswordValidation("", new Label(), new Label(), 10);

            Assert.IsFalse(result);
        }
        public void LengthValid_StartNull_EmptyString_ReturnFalse()
        {
            int               start   = 0;
            int               end     = 6;
            Label             eLabel  = new Label();
            string            text    = "";
            string            name    = "Имя";
            ValidationServise service = new ValidationServise(new Label());
            bool              result  = service.LengthValid(start, end, eLabel, text, name);

            Assert.IsFalse(result);
        }
예제 #12
0
 public AutentificationPage()
 {
     InitializeComponent();
     service = new ValidationServise();
 }