GetDifferences() public method

public GetDifferences ( string path, string pattern ) : Dictionary>
path string
pattern string
return Dictionary>
Ejemplo n.º 1
0
 private static void LaunchDiffMode(string path, string pattern)
 {
     var folderProcessor = new FolderProcessor();
     var differences = folderProcessor.GetDifferences(path, pattern);
     foreach (var difference in differences)
     {
         if (difference.Value.Count != 0)
         {
             Console.WriteLine("{0} differences:", difference.Key);
             foreach (var value in difference.Value)
             {
                 Console.WriteLine("\t{0} in file: \"{1}\", in name: \"{2}\"", Frame.GetString(value.Key), value.Value.FileValue, value.Value.PathValue);
             }
         }
     }
 }
Ejemplo n.º 2
0
        public void NoDiffTests()
        {
            var fileSystem = new FileSystemBuilder().
                File(new FileBuilder().
                    FilePath("artist - song").
                    Tag(FrameType.Artist, "artist").
                    Tag(FrameType.Title, "song").
                    Build()).
                File(new FileBuilder().
                    FilePath("art - so").
                    Tag(FrameType.Artist, "art").
                    Tag(FrameType.Title, "so").
                    Build()).
                Build();
            var folderProcessor = new FolderProcessor(fileSystem,fileSystem);

            var differences = folderProcessor.GetDifferences("", "<ar> - <ti>");

            Assert.AreEqual(0,differences.Count);
        }