Ejemplo n.º 1
0
        public async Task <IEnumerable <FileContentEntity> > ProcessDataByDomainLanguage(IList <WikimediaEntity> listDownload)
        {
            ReadFiles             = new ReadFiles();
            GroupList             = new GroupList();
            ReadFileCodes         = new ReadFileCodes();
            ProcessConversionData = new ProcessConversionData();

            var list = new List <FileContentEntity>();



            var codes = ReadFileCodes.getListCodes();

            foreach (var item in listDownload)
            {
                var result = await ReadFiles.ReadFileAsync(item.localPath, item.hour);

                var processedList = ProcessConversionData.ConvertDataToProcess(result, codes);

                var listGroup = GroupList.GetGroupedList(processedList);

                var maxViewCont = listGroup.GetMax(item => item.viewCount);
                maxViewCont.period = item.hour;
                list.Add(maxViewCont);
            }


            return(list);
        }
Ejemplo n.º 2
0
 public void GetGroupedList_Nullo_Empty_Words_ArgumentException()
 {
     Assert.Throws <ArgumentException>(() => _GroupList.GetGroupedList(null));
 }