public void Error_Fichero_Vacio() { try { FicheroEntrada ficheroEntrada = new FicheroEntrada(); bool result = ficheroEntrada.RecorrerFichero(new StreamReader(new MemoryStream())); Assert.Fail("Error fichero vacio"); } catch { //Ok } }
public void Recorrer_Fichero() { FakeStreamContenidoFichero fakeStream = new FakeStreamContenidoFichero(false); FicheroEntrada ficheroEntrada = new FicheroEntrada(); bool result = ficheroEntrada.RecorrerFichero(fakeStream.contenidoFichero); Assert.IsTrue(result); }