public void CadenaConexionIncorrectaShouldReturnFalse() { String cadena = "data source = Aqui Fallo; initial catalog = Taller; integrated security = True;"; Planilla p = new Planilla(); p.coneccion = new Coneccion(); Assert.IsFalse(p.Conexion(cadena)); }
public void CadenaConexionCorrectaShouldReturnTrue() { String cadena = "data source = HILBERTPC; initial catalog = Taller; integrated security = True;"; Planilla p = new Planilla(); p.coneccion = new Coneccion(); Assert.IsTrue(p.Conexion(cadena)); }
public void InsertarValoresIncorrectosShouldReturnFalse() { ArrayList valuesTest = new ArrayList(); valuesTest.Add("2931974320101"); valuesTest.Add("Juan"); valuesTest.Add("Pablo"); valuesTest.Add("Gomez"); valuesTest.Add("Perez"); valuesTest.Add("%$"); Planilla planilla = new Planilla(); planilla.coneccion = new Coneccion(); String cadena = "data source = You Shoul not Pass; initial catalog = Taller; integrated security = True;"; planilla.Conexion(cadena); Assert.IsFalse(planilla.IngresoDB(valuesTest)); }