Esempio n. 1
0
        public List <GeneralFileModel> DeleteDuplicateFiles(string [] files)
        {
            GenerateFiles gf       = new GenerateFiles();
            var           allFiles = gf.StringsToModels(files);

            return(new FileModelDeleteDuplicates(new FileHasherMd5()).Run(allFiles));
        }
        public void Test9_DeleteDuplicates()
        {
            if (!Directory.Exists(TestRunDirectoryPath))
            {
                Setup();
            }

            IFilesSeeker filesSeeker = new FilesSeeker();
            var          files       = filesSeeker.ByPath(TestRunDirectoryPath);

            files = files.Where(x => !x.Contains(".directory")).ToList();

            GenerateFiles gf       = new GenerateFiles();
            var           allFiles = gf.StringsToModels(files.ToArray());

            var value = new FileModelDeleteDuplicates(new FileHasherMd5()).Run(allFiles);



            Assert.AreEqual(CountOfOriginFiles, value.Count);
        }