Example #1
0
        public void DeleteFilesWithSameContent()
        {
            string folder = @"D:\_Test\sunamo\Helpers\FileSystem\FS\DeleteFilesWithSameContent\";

            var files = FS.GetFiles(folder, "*.txt", System.IO.SearchOption.AllDirectories, new GetFilesArgs {
                _trimA1 = true
            });

            FS.DeleteFilesWithSameContent(files);

            files = FS.GetFiles(folder, "*.txt", System.IO.SearchOption.AllDirectories, new GetFilesArgs {
                _trimA1 = true
            });

            var filesExcepted = CA.ToListString(TestDataTxt.a, TestDataTxt.ab);

            Assert.Equal <string>(filesExcepted, files);
        }