Example #1
0
 public void SimpleWithTrackNumber()
 {
     FuzzyMatcher f = new FuzzyMatcher();
     var filenames = new[]
     {
         "/home/ngeor/iTunes/Artist/Album/01 Track.mp3".NormalizePath()
     };
     var result = f.Find("/home/ngeor/iTunes/".NormalizePath(), filenames, "Artist - Track");
     CollectionAssert.AreEqual(filenames, result);
 }
Example #2
0
 public void MatchStartsWith()
 {
     FuzzyMatcher f = new FuzzyMatcher();
     var filenames = new[]
         {
             "/home/ngeor/iTunes/Compilations/A Tribute To Abba/03 Gimme! Gimme! Gimme! (A Man After Midnight).mp3".NormalizePath()
         };
     var result = f.Find("/home/ngeor/iTunes/".NormalizePath(), filenames, "Compilations - Gimme, Gimme, Gimme");
     CollectionAssert.AreEqual(filenames, result);
 }
Example #3
0
 public void MatchIsCaseInsensitive()
 {
     FuzzyMatcher f = new FuzzyMatcher();
     var filenames = new[]
     {
         "/home/ngeor/iTunes/ARTIST/Album/01 TRACK.mp3".NormalizePath()
     };
     var result = f.Find("/home/ngeor/iTunes/".NormalizePath(), filenames, "Artist - Track");
     CollectionAssert.AreEqual(filenames, result);
 }
Example #4
0
 public void ShouldMatchAllArtistsIfOnlyTrackIsGiven()
 {
     FuzzyMatcher f = new FuzzyMatcher();
     var filenames = new[]
         {
             "/home/ngeor/iTunes/Artist1/Album3/01-2 Track.mp3".NormalizePath(),
             "/home/ngeor/iTunes/Artist2/Album4/01-2 Track.mp3".NormalizePath()
         };
     var result = f.Find("/home/ngeor/iTunes/".NormalizePath(), filenames, "Track");
     CollectionAssert.AreEqual(filenames, result);
 }