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); }
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); }
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); }
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); }