public void GetCollecionModulosSeccionServicios()
        {
            var boletin = new Boletin(inputBoletinText);

            IEnumerable<string> coleccionModulos = boletin.GetModulosSeccion(BoletinSeccion.Servicios);

            Assert.AreEqual(2, coleccionModulos.Count());
        }
        public void GetCollecionModulosSeccionDictamenesDeEvaluacion()
        {
            var boletin = new Boletin(inputBoletinText);

            IEnumerable<string> coleccionModulos = boletin.GetModulosSeccion(BoletinSeccion.Dictamenes);

            Assert.AreEqual(1, coleccionModulos.Count());
        }
        public void GetCollecionModulosSeccionAdjudicaciones()
        {
            var boletin = new Boletin(inputBoletinText);

            IEnumerable<string> coleccionModulos = boletin.GetModulosSeccion(BoletinSeccion.Adjudicaciones);

            Assert.AreEqual(coleccionModulos.Count(), 4);
            Assert.IsTrue(coleccionModulos.ElementAt(0).Contains("BANCO DE LA NACION ARGENTINA"));
            Assert.IsTrue(coleccionModulos.ElementAt(2).Contains("BLOQUE2"));
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            BoletinFileName boletinFileName = new BoletinFileName(args[0]);

            Boletin boletin;
            //using (var streamReader = new StreamReader(@"C:\Documents and Settings\Administrador\Mis documentos\Visual Studio 2010\Projects\boletin\material\BO20111201-3.txt"))
            using (var streamReader = new StreamReader(boletinFileName.FilePath))
            {
                boletin = new Boletin(streamReader.ReadToEnd());
            }

            AdjudicadorBuilder adjudicadorBuilder = new AdjudicadorBuilder(new ExtractorAdjudicacion());
            AdjudicacionRepository adjudicacionRepository = new AdjudicacionRepository();

            var modulos = boletin.GetModulosSeccion(BoletinSeccion.Adjudicaciones);
            foreach(var modulo in modulos)
            {
                Adjudicacion adjudicacion = adjudicadorBuilder.Build(modulo);
                adjudicacion.FechaBoletin = boletinFileName.GetDate();
                adjudicacionRepository.Save(adjudicacion);
            }
        }