|
|
@ -108,6 +108,11 @@ public class SearchServiceSpecialGenreTestCase { |
|
|
|
return musicFolders; |
|
|
|
return musicFolders; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
* A count to deliberately stagger the execution of populateDatabase. |
|
|
|
|
|
|
|
* If populate Database is called from multiple methods almost simultaneously, |
|
|
|
|
|
|
|
* it may not execute correctly. |
|
|
|
|
|
|
|
*/ |
|
|
|
private int count = 1; |
|
|
|
private int count = 1; |
|
|
|
|
|
|
|
|
|
|
|
private synchronized void populateDatabase() { |
|
|
|
private synchronized void populateDatabase() { |
|
|
@ -135,9 +140,6 @@ public class SearchServiceSpecialGenreTestCase { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testQueryEscapeRequires() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* There are 19 files |
|
|
|
* There are 19 files |
|
|
|
* in src/test/resources/MEDIAS/Search/SpecialGenre/ARTIST1/ALBUM_A. |
|
|
|
* in src/test/resources/MEDIAS/Search/SpecialGenre/ARTIST1/ALBUM_A. |
|
|
@ -147,6 +149,8 @@ public class SearchServiceSpecialGenreTestCase { |
|
|
|
* Legacy can not search all these genres. |
|
|
|
* Legacy can not search all these genres. |
|
|
|
* (Strictly speaking, the genre field is not created at index creation.) |
|
|
|
* (Strictly speaking, the genre field is not created at index creation.) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testQueryEscapeRequires() { |
|
|
|
|
|
|
|
|
|
|
|
List<MusicFolder> folders = getTestMusicFolders(); |
|
|
|
List<MusicFolder> folders = getTestMusicFolders(); |
|
|
|
|
|
|
|
|
|
|
@ -211,13 +215,12 @@ public class SearchServiceSpecialGenreTestCase { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testBrackets() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* Jaudiotagger applies special treatment to bracket (FILE17). |
|
|
|
* Jaudiotagger applies special treatment to bracket (FILE17). |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testBrackets() { |
|
|
|
|
|
|
|
|
|
|
|
List<MusicFolder> folders = getTestMusicFolders(); |
|
|
|
List<MusicFolder> folders = getTestMusicFolders(); |
|
|
|
|
|
|
|
|
|
|
@ -245,12 +248,12 @@ public class SearchServiceSpecialGenreTestCase { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testNumericMapping() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* Jaudiotagger applies special treatment to numeric. (FILE18) |
|
|
|
* Jaudiotagger applies special treatment to numeric. (FILE18) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testNumericMapping() { |
|
|
|
|
|
|
|
|
|
|
|
List<MusicFolder> folders = getTestMusicFolders(); |
|
|
|
List<MusicFolder> folders = getTestMusicFolders(); |
|
|
|
|
|
|
|
|
|
|
|
RandomSearchCriteria criteria = new RandomSearchCriteria(Integer.MAX_VALUE, // count
|
|
|
|
RandomSearchCriteria criteria = new RandomSearchCriteria(Integer.MAX_VALUE, // count
|
|
|
@ -269,9 +272,6 @@ public class SearchServiceSpecialGenreTestCase { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testOthers() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
* Other special strings. (FILE19) |
|
|
|
* Other special strings. (FILE19) |
|
|
|
* |
|
|
|
* |
|
|
@ -281,6 +281,9 @@ public class SearchServiceSpecialGenreTestCase { |
|
|
|
* so searchable characters are different. |
|
|
|
* so searchable characters are different. |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testOthers() { |
|
|
|
|
|
|
|
|
|
|
|
List<MusicFolder> folders = getTestMusicFolders(); |
|
|
|
List<MusicFolder> folders = getTestMusicFolders(); |
|
|
|
|
|
|
|
|
|
|
|
RandomSearchCriteria criteria = new RandomSearchCriteria(Integer.MAX_VALUE, // count
|
|
|
|
RandomSearchCriteria criteria = new RandomSearchCriteria(Integer.MAX_VALUE, // count
|
|
|
|