Exemplo n.º 1
0
        private bool verificarExistencia(ClsNValidacion validacion)
        {
            bool result = validacion.existeCliente(error1, txtCliente, "El Cliente no Existe");

            result = validacion.existeProducto(error1, txtProducto, "El Producto no Existe") && result;
            return(result);
        }
Exemplo n.º 2
0
        public void testExisteClienteNombre_returnTrue()
        {
            ClsNValidacion obj = ClsNValidacion.getValidacion();
            ErrorProvider  err = new ErrorProvider();
            TextBox        txt = new TextBox();

            txt.Text = "NORA GLENDA PONCE PALZA";
            string mensaje = "Error";

            bool result = obj.existeCliente(err, txt, mensaje);

            Assert.IsTrue(result);
        }
Exemplo n.º 3
0
        public void testNoExisteClienteNombre_returnFalse()
        {
            ClsNValidacion obj = ClsNValidacion.getValidacion();
            ErrorProvider  err = new ErrorProvider();
            TextBox        txt = new TextBox();

            txt.Text = "JUANITO JUANITO JUANITO JUANITO";
            string mensaje = "Error";

            bool result = obj.existeCliente(err, txt, mensaje);

            Assert.IsFalse(result);
        }
Exemplo n.º 4
0
        public void testExisteClienteDni_returnTrue()
        {
            ClsNValidacion obj = ClsNValidacion.getValidacion();
            ErrorProvider  err = new ErrorProvider();
            TextBox        txt = new TextBox();

            txt.Text = "00491420";
            string mensaje = "Error";

            bool result = obj.existeCliente(err, txt, mensaje);

            Assert.IsTrue(result);
        }