コード例 #1
0
        public void LeerArchivo_EnviarUrlIncorrecto_ExceptioFileNotExist()
        {
            //Arrange
            LeerArchivoTexto Lector       = new LeerArchivoTexto();
            List <string>    lstRegistros = new List <string>();

            //Act
            Lector.lectorArchivo = e => throw new FileNotFoundException();
            //Assert
            lstRegistros = Lector.LeerArchivo("Pedidos.txt");
        }
コード例 #2
0
        public void LeerArchivo_EnviarUrlExistente_ArregloConRegistros()
        {
            //Arrange
            LeerArchivoTexto Lector       = new LeerArchivoTexto();
            List <string>    lstRegistros = new List <string>();

            //Act
            lstRegistros = Lector.LeerArchivo("../../../Bridge/bin/Debug/Pedidos.txt");
            //Assert
            Assert.IsTrue(lstRegistros.Any());
        }
コード例 #3
0
        public static void Main(string[] args)
        {
            try
            {
                ILeerArchivo        lectorArchivoTxt   = new LeerArchivoTexto(args[0]);
                ITransformarArchivo transformarEventos = new TransformarEventosXComa(lectorArchivoTxt);
                IProcesarEventos    procesarEventos    = new ProcesarEventos.ProcesarEventos(transformarEventos);
                procesarEventos.ProcesarEventos();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadKey();
        }