コード例 #1
0
        public void CheckValidatiePassword()
        {
            // wachtwoord moet minimaal 8 karaters lang zijn, 1 cijfer bevatten en een hoofdletter bevatten.
            // Arrange
            bool   check     = false;
            bool   check1    = false;
            bool   check2    = false;
            bool   check3    = false;
            string passFout  = "Welkom";       // niet 8 karaters lang zijn en bevat geen cijfer
            string passFout1 = "welkom123";    // bevat geen hoofdletter
            string passFout2 = "WelkomWelkom"; // bevat geen cijfers
            string passGoed  = "Welkom123";

            // Act
            Validatie val = new Validatie();

            if (val.ValidatieWachtwoord(passFout))
            {
                check = true;
            }

            if (val.ValidatieWachtwoord(passFout1))
            {
                check1 = true;
            }

            if (val.ValidatieWachtwoord(passFout2))
            {
                check2 = true;
            }

            if (val.ValidatieWachtwoord(passGoed))
            {
                check3 = true;
            }

            // Assert
            Assert.False(check);
            Assert.False(check1);
            Assert.False(check2);
            Assert.True(check3);
        }
コード例 #2
0
 // check of het in gevulde klopt
 public bool registerCheck(string klantEmail, string klantPassword, string telefoonNummer, string postcode)
 {
     validatie = new Validatie();
     if (!validatie.ValidatieEmail(klantEmail))
     {
         return(false);
     }
     else if (!validatie.ValidatieWachtwoord(klantPassword))
     {
         return(false);
     }
     else if (!validatie.ValidatieTelefoonNR(telefoonNummer))
     {
         return(false);
     }
     else if (!validatie.ValidatiePostcode(postcode))
     {
         return(false);
     }
     return(true);
 }
コード例 #3
0
 // check of het in gevulde klopt
 public bool registerCheck(Klant klant)
 {
     validatie = new Validatie();
     if (!validatie.ValidatieEmail(klant.klantEmail))
     {
         return(false);
     }
     else if (!validatie.ValidatieWachtwoord(klant.klantPassword))
     {
         return(false);
     }
     else if (!validatie.ValidatieTelefoonNR(klant.telefoonNummer))
     {
         return(false);
     }
     else if (!validatie.ValidatiePostcode(klant.postcode))
     {
         return(false);
     }
     return(true);
 }