Exemple #1
0
        public void ParseIndustryDtoToModelObject_ReturnsListOfTypeIndustrySector_GivenValidData()
        {
            var _dtoIndustryService = new DtoToIndustryObjectService();
            var repo   = IndustryGDPDataRepository.GetIndustrySectorGDPData();
            var list   = repo.GetAll().ToList();
            var result = _dtoIndustryService.ParseIndustryDtoToModelObject(list);

            Assert.AreEqual(result, typeof(List <IndustryAnnualGDP>));
        }
Exemple #2
0
        static void Main(string[] args)
        {
            InitiliaseDependencies();
            var _csvParsingService   = new CSVParsingService();
            var _entityTableFactory  = new EntityDataTableFactory();
            var _dtoObjectService    = new DtoToIndustryObjectService();
            var _gdpProcessingServce = new GDPDtoProcessingService(_entityTableFactory, _dtoObjectService);



            var gdpDataList = _csvParsingService.ParseCSV();
            var dataTables  = _gdpProcessingServce.BuildDataTablesList(gdpDataList);

            _industryImportService.Import(dataTables);
            //16/1/18 TODO
            //Figure out ninject? Not really a priority, but you're going to start needing to look at it, especially for config
            //Get a database setup and import that data. Make some table gateways. I've already got the entity factories working
            //Import method mofo
        }