private void btnSearch_Click(object sender, EventArgs e)
 {
     if (clientValidator.ValidateClientCnp(txtCnp.Text.Trim()))
     {
         core.Models.Client client = adminClientHandler.ReadClientByCnp(txtCnp.Text.Trim());
         MessageBox.Show("Client:\nName: " + client.firstName + " " + client.lastName + "\nCnp: " + client.cnp + "\nAddress: " + client.address);
     }
     else
     {
         MessageBox.Show("Invalid data");
     }
 }
Exemple #2
0
        public void TestValidateClientCnp()
        {
            var clientValidator = new ClientValidator();

            Assert.IsFalse(clientValidator.ValidateClientCnp("1234"));
        }