|
|
@ -8,9 +8,7 @@ import org.airsonic.player.domain.RandomSearchCriteria; |
|
|
|
import org.airsonic.player.domain.SearchCriteria; |
|
|
|
import org.airsonic.player.domain.SearchCriteria; |
|
|
|
import org.airsonic.player.util.HomeRule; |
|
|
|
import org.airsonic.player.util.HomeRule; |
|
|
|
import org.apache.commons.lang.builder.ToStringBuilder; |
|
|
|
import org.apache.commons.lang.builder.ToStringBuilder; |
|
|
|
import org.apache.lucene.queryParser.ParseException; |
|
|
|
|
|
|
|
import org.apache.lucene.search.Query; |
|
|
|
import org.apache.lucene.search.Query; |
|
|
|
import org.apache.lucene.util.NumericUtils; |
|
|
|
|
|
|
|
import org.junit.ClassRule; |
|
|
|
import org.junit.ClassRule; |
|
|
|
import org.junit.Rule; |
|
|
|
import org.junit.Rule; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
@ -77,8 +75,34 @@ public class QueryFactoryTestCase { |
|
|
|
private static final List<MusicFolder> SINGLE_FOLDERS = Arrays.asList(MUSIC_FOLDER1); |
|
|
|
private static final List<MusicFolder> SINGLE_FOLDERS = Arrays.asList(MUSIC_FOLDER1); |
|
|
|
private static final List<MusicFolder> MULTI_FOLDERS = Arrays.asList(MUSIC_FOLDER1, MUSIC_FOLDER2); |
|
|
|
private static final List<MusicFolder> MULTI_FOLDERS = Arrays.asList(MUSIC_FOLDER1, MUSIC_FOLDER2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
* XXX 3.x -> 8.x : |
|
|
|
|
|
|
|
* It does not change the basic functional requirements for the query. |
|
|
|
|
|
|
|
* However, some minor improvements are included. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* - Use 'Or' instead of 'SpanOr'. |
|
|
|
|
|
|
|
* This is suitable for 8.x document definition and query grammar. |
|
|
|
|
|
|
|
* A more rigorous comparison. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* - Removed comparison of input value and path from condition of search. |
|
|
|
|
|
|
|
* It causes a false search that the user can not imagine. |
|
|
|
|
|
|
|
* Originally unnecessary. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* - mediaType and genre changed to raw string key comparison. |
|
|
|
|
|
|
|
* Currently, these are "key" strings, both in the requirements and in the implementation. |
|
|
|
|
|
|
|
* The legacy "normalize" is dirty code that compensates for the incomplete analytics implementation |
|
|
|
|
|
|
|
* and is not necessary as long as proper key comparison can be done. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* => Treating these strictly as keys enables DB reference. |
|
|
|
|
|
|
|
* For example, can support multi-genre by creating a new genre field that implements another Tokenizer. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* - The method for comparing ranges of numbers has changed. |
|
|
|
|
|
|
|
* This is suitable for 8.x. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testSearchArtist() throws ParseException, IOException { |
|
|
|
public void testSearchArtist() throws IOException { |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
@ -86,16 +110,16 @@ public class QueryFactoryTestCase { |
|
|
|
|
|
|
|
|
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.ARTIST); |
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.ARTIST); |
|
|
|
assertEquals("SearchArtist", |
|
|
|
assertEquals("SearchArtist", |
|
|
|
"+((artist:abc* folder:abc*) (artist:def* folder:def*)) +spanOr([folder:" + PATH1 + "])", |
|
|
|
"+((artist:abc*) (artist:def*)) +(folder:" + PATH1 + ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ARTIST); |
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ARTIST); |
|
|
|
assertEquals("SearchArtist", "+((artist:abc* folder:abc*) (artist:def* folder:def*)) +spanOr([folder:" + PATH1 |
|
|
|
assertEquals("SearchArtist", "+((artist:abc*) (artist:def*)) +(folder:" + PATH1 |
|
|
|
+ ", folder:" + PATH2 + "])", query.toString()); |
|
|
|
+ " folder:" + PATH2 + ")", query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testSearchAlbum() throws ParseException, IOException { |
|
|
|
public void testSearchAlbum() throws IOException { |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
@ -103,19 +127,19 @@ public class QueryFactoryTestCase { |
|
|
|
|
|
|
|
|
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.ALBUM); |
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.ALBUM); |
|
|
|
assertEquals("SearchAlbum", |
|
|
|
assertEquals("SearchAlbum", |
|
|
|
"+((album:abc* artist:abc* folder:abc*) (album:def* artist:def* folder:def*)) +spanOr([folder:" + PATH1 |
|
|
|
"+((album:abc* artist:abc*) (album:def* artist:def*)) +(folder:" + PATH1 |
|
|
|
+ "])", |
|
|
|
+ ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ALBUM); |
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ALBUM); |
|
|
|
assertEquals("SearchAlbum", |
|
|
|
assertEquals("SearchAlbum", |
|
|
|
"+((album:abc* artist:abc* folder:abc*) (album:def* artist:def* folder:def*)) +spanOr([folder:" + PATH1 |
|
|
|
"+((album:abc* artist:abc*) (album:def* artist:def*)) +(folder:" + PATH1 |
|
|
|
+ ", folder:" + PATH2 + "])", |
|
|
|
+ " folder:" + PATH2 + ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testSearchSong() throws ParseException, IOException { |
|
|
|
public void testSearchSong() throws IOException { |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
@ -123,34 +147,34 @@ public class QueryFactoryTestCase { |
|
|
|
|
|
|
|
|
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.SONG); |
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.SONG); |
|
|
|
assertEquals("SearchSong", |
|
|
|
assertEquals("SearchSong", |
|
|
|
"+((title:abc* artist:abc*) (title:def* artist:def*)) +spanOr([folder:" + PATH1 + "])", |
|
|
|
"+((title:abc* artist:abc*) (title:def* artist:def*)) +(folder:" + PATH1 + ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.SONG); |
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.SONG); |
|
|
|
assertEquals("SearchSong", "+((title:abc* artist:abc*) (title:def* artist:def*)) +spanOr([folder:" + PATH1 |
|
|
|
assertEquals("SearchSong", "+((title:abc* artist:abc*) (title:def* artist:def*)) +(folder:" + PATH1 |
|
|
|
+ ", folder:" + PATH2 + "])", query.toString()); |
|
|
|
+ " folder:" + PATH2 + ")", query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testSearchArtistId3() throws ParseException, IOException { |
|
|
|
public void testSearchArtistId3() throws IOException { |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
|
criteria.setQuery(QUERY_ENG_ONLY); |
|
|
|
criteria.setQuery(QUERY_ENG_ONLY); |
|
|
|
|
|
|
|
|
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.ARTIST_ID3); |
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.ARTIST_ID3); |
|
|
|
assertEquals("SearchSong", "+((artist:abc*) (artist:def*)) +spanOr([folderId:" |
|
|
|
assertEquals("SearchSong", "+((artist:abc*) (artist:def*)) +(folderId:" |
|
|
|
+ NumericUtils.intToPrefixCoded(FID1) + "])", query.toString()); |
|
|
|
+ FID1 + ")", query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ARTIST_ID3); |
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ARTIST_ID3); |
|
|
|
assertEquals("SearchSong", |
|
|
|
assertEquals("SearchSong", |
|
|
|
"+((artist:abc*) (artist:def*)) +spanOr([folderId:" + NumericUtils.intToPrefixCoded(FID1) |
|
|
|
"+((artist:abc*) (artist:def*)) +(folderId:" + FID1 |
|
|
|
+ ", folderId:" + NumericUtils.intToPrefixCoded(FID2) + "])", |
|
|
|
+ " folderId:" + FID2 + ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testSearchAlbumId3() throws ParseException, IOException { |
|
|
|
public void testSearchAlbumId3() throws IOException { |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
SearchCriteria criteria = new SearchCriteria(); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setOffset(10); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
|
criteria.setCount(Integer.MAX_VALUE); |
|
|
@ -158,74 +182,74 @@ public class QueryFactoryTestCase { |
|
|
|
|
|
|
|
|
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.ALBUM_ID3); |
|
|
|
Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.ALBUM_ID3); |
|
|
|
assertEquals( |
|
|
|
assertEquals( |
|
|
|
"SearchAlbumId3", "+((album:abc* artist:abc* folderId:abc*) (album:def* artist:def* folderId:def*)) " |
|
|
|
"SearchAlbumId3", "+((album:abc* artist:abc*) (album:def* artist:def*)) " |
|
|
|
+ "+spanOr([folderId:" + NumericUtils.intToPrefixCoded(FID1) + "])", |
|
|
|
+ "+(folderId:" + FID1 + ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ALBUM_ID3); |
|
|
|
query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ALBUM_ID3); |
|
|
|
assertEquals("SearchAlbumId3", |
|
|
|
assertEquals("SearchAlbumId3", |
|
|
|
"+((album:abc* artist:abc* folderId:abc*) (album:def* artist:def* folderId:def*)) +spanOr([folderId:" |
|
|
|
"+((album:abc* artist:abc*) (album:def* artist:def*)) +(folderId:" |
|
|
|
+ NumericUtils.intToPrefixCoded(FID1) + ", folderId:" |
|
|
|
+ FID1 + " folderId:" |
|
|
|
+ NumericUtils.intToPrefixCoded(FID2) + "])", |
|
|
|
+ FID2 + ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testSearchByNameArtist() throws ParseException { |
|
|
|
public void testSearchByNameArtist() throws IOException { |
|
|
|
Query query = queryFactory.searchByName(FieldNames.ARTIST, QUERY_ENG_ONLY); |
|
|
|
Query query = queryFactory.searchByName(FieldNames.ARTIST, QUERY_ENG_ONLY); |
|
|
|
assertEquals("SearchByNameArtist", "artist:abc artist:def*", query.toString()); |
|
|
|
assertEquals("SearchByNameArtist", "artist:abc artist:def*", query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testSearchByNameAlbum() throws ParseException { |
|
|
|
public void testSearchByNameAlbum() throws IOException { |
|
|
|
Query query = queryFactory.searchByName(FieldNames.ALBUM, QUERY_ENG_ONLY); |
|
|
|
Query query = queryFactory.searchByName(FieldNames.ALBUM, QUERY_ENG_ONLY); |
|
|
|
assertEquals("SearchByNameAlbum", "album:abc album:def*", query.toString()); |
|
|
|
assertEquals("SearchByNameAlbum", "album:abc album:def*", query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testSearchByNameTitle() throws ParseException { |
|
|
|
public void testSearchByNameTitle() throws IOException { |
|
|
|
Query query = queryFactory.searchByName(FieldNames.TITLE, QUERY_ENG_ONLY); |
|
|
|
Query query = queryFactory.searchByName(FieldNames.TITLE, QUERY_ENG_ONLY); |
|
|
|
assertEquals("SearchByNameTitle", "title:abc title:def*", query.toString()); |
|
|
|
assertEquals("SearchByNameTitle", "title:abc title:def*", query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testGetRandomSongs() { |
|
|
|
public void testGetRandomSongs() throws IOException { |
|
|
|
RandomSearchCriteria criteria = new RandomSearchCriteria(50, "Classic Rock", |
|
|
|
RandomSearchCriteria criteria = new RandomSearchCriteria(50, "Classic Rock", |
|
|
|
Integer.valueOf(1900), Integer.valueOf(2000), SINGLE_FOLDERS); |
|
|
|
Integer.valueOf(1900), Integer.valueOf(2000), SINGLE_FOLDERS); |
|
|
|
|
|
|
|
|
|
|
|
Query query = queryFactory.getRandomSongs(criteria); |
|
|
|
Query query = queryFactory.getRandomSongs(criteria); |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
"+mediaType:music +genre:classicrock +year:[1900 TO 2000] +spanOr([folder:" + PATH1 + "])", |
|
|
|
"+mediaType:MUSIC +genre:Classic Rock +year:[1900 TO 2000] +(folder:" + PATH1 + ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
criteria = new RandomSearchCriteria(50, "Classic Rock", Integer.valueOf(1900), |
|
|
|
criteria = new RandomSearchCriteria(50, "Classic Rock", Integer.valueOf(1900), |
|
|
|
Integer.valueOf(2000), MULTI_FOLDERS); |
|
|
|
Integer.valueOf(2000), MULTI_FOLDERS); |
|
|
|
query = queryFactory.getRandomSongs(criteria); |
|
|
|
query = queryFactory.getRandomSongs(criteria); |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
"+mediaType:music +genre:classicrock +year:[1900 TO 2000] +spanOr([folder:" + PATH1 + ", folder:" + PATH2 |
|
|
|
"+mediaType:MUSIC +genre:Classic Rock +year:[1900 TO 2000] +(folder:" + PATH1 + " folder:" + PATH2 |
|
|
|
+ "])", |
|
|
|
+ ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
criteria = new RandomSearchCriteria(50, "Classic Rock", null, null, MULTI_FOLDERS); |
|
|
|
criteria = new RandomSearchCriteria(50, "Classic Rock", null, null, MULTI_FOLDERS); |
|
|
|
query = queryFactory.getRandomSongs(criteria); |
|
|
|
query = queryFactory.getRandomSongs(criteria); |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
"+mediaType:music +genre:classicrock +spanOr([folder:" + PATH1 + ", folder:" + PATH2 + "])", |
|
|
|
"+mediaType:MUSIC +genre:Classic Rock +(folder:" + PATH1 + " folder:" + PATH2 + ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
criteria = new RandomSearchCriteria(50, "Classic Rock", Integer.valueOf(1900), null, |
|
|
|
criteria = new RandomSearchCriteria(50, "Classic Rock", Integer.valueOf(1900), null, |
|
|
|
MULTI_FOLDERS); |
|
|
|
MULTI_FOLDERS); |
|
|
|
query = queryFactory.getRandomSongs(criteria); |
|
|
|
query = queryFactory.getRandomSongs(criteria); |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
"+mediaType:music +genre:classicrock +year:[1900 TO *] +spanOr([folder:" + PATH1 + ", folder:" + PATH2 |
|
|
|
"+mediaType:MUSIC +genre:Classic Rock +year:[1900 TO 2147483647] +(folder:" + PATH1 + " folder:" + PATH2 |
|
|
|
+ "])", |
|
|
|
+ ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
criteria = new RandomSearchCriteria(50, "Classic Rock", null, Integer.valueOf(2000), |
|
|
|
criteria = new RandomSearchCriteria(50, "Classic Rock", null, Integer.valueOf(2000), |
|
|
|
MULTI_FOLDERS); |
|
|
|
MULTI_FOLDERS); |
|
|
|
query = queryFactory.getRandomSongs(criteria); |
|
|
|
query = queryFactory.getRandomSongs(criteria); |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(criteria), |
|
|
|
"+mediaType:music +genre:classicrock +year:[* TO 2000] +spanOr([folder:" + PATH1 + ", folder:" + PATH2 |
|
|
|
"+mediaType:MUSIC +genre:Classic Rock +year:[-2147483648 TO 2000] +(folder:" + PATH1 + " folder:" + PATH2 |
|
|
|
+ "])", |
|
|
|
+ ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -233,23 +257,23 @@ public class QueryFactoryTestCase { |
|
|
|
public void testGetRandomAlbums() { |
|
|
|
public void testGetRandomAlbums() { |
|
|
|
Query query = queryFactory.getRandomAlbums(SINGLE_FOLDERS); |
|
|
|
Query query = queryFactory.getRandomAlbums(SINGLE_FOLDERS); |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(SINGLE_FOLDERS), |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(SINGLE_FOLDERS), |
|
|
|
"spanOr([folder:" + PATH1 + "])", query.toString()); |
|
|
|
"(folder:" + PATH1 + ")", query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
query = queryFactory.getRandomAlbums(MULTI_FOLDERS); |
|
|
|
query = queryFactory.getRandomAlbums(MULTI_FOLDERS); |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(MULTI_FOLDERS), |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(MULTI_FOLDERS), |
|
|
|
"spanOr([folder:" + PATH1 + ", folder:" + PATH2 + "])", query.toString()); |
|
|
|
"(folder:" + PATH1 + " folder:" + PATH2 + ")", query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testGetRandomAlbumsId3() { |
|
|
|
public void testGetRandomAlbumsId3() { |
|
|
|
Query query = queryFactory.getRandomAlbumsId3(SINGLE_FOLDERS); |
|
|
|
Query query = queryFactory.getRandomAlbumsId3(SINGLE_FOLDERS); |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(SINGLE_FOLDERS), |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(SINGLE_FOLDERS), |
|
|
|
"spanOr([folderId:" + NumericUtils.intToPrefixCoded(FID1) + "])", query.toString()); |
|
|
|
"(folderId:" + FID1 + ")", query.toString()); |
|
|
|
|
|
|
|
|
|
|
|
query = queryFactory.getRandomAlbumsId3(MULTI_FOLDERS); |
|
|
|
query = queryFactory.getRandomAlbumsId3(MULTI_FOLDERS); |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(MULTI_FOLDERS), |
|
|
|
assertEquals(ToStringBuilder.reflectionToString(MULTI_FOLDERS), |
|
|
|
"spanOr([folderId:" + NumericUtils.intToPrefixCoded(FID1) + ", folderId:" |
|
|
|
"(folderId:" + FID1 + " folderId:" |
|
|
|
+ NumericUtils.intToPrefixCoded(FID2) + "])", |
|
|
|
+ FID2 + ")", |
|
|
|
query.toString()); |
|
|
|
query.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|