ALF-9086 "RINF 52: Lucene Removal: Fix FileFolderService search methods"

- FileFolderService can return List<FileInfo> or PagingResults<FileInfo>

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29603 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2011-08-08 10:45:14 +00:00
parent 9826a1fdcc
commit 5a8ff3dfc1
2 changed files with 88 additions and 47 deletions

View File

@@ -212,6 +212,24 @@ public class FileFolderServiceImplTest extends TestCase
{ NAME_L0_FILE_A, NAME_L0_FILE_B, NAME_L0_FOLDER_A, NAME_L0_FOLDER_B, NAME_L0_FOLDER_C };
checkFileList(files, 2, 3, expectedNames);
}
public void testShallowFilesAndFoldersListWithLocale() throws Exception
{
Locale savedLocale = I18NUtil.getContentLocaleOrNull();
try
{
I18NUtil.setContentLocale(Locale.CANADA);
List<FileInfo> files = fileFolderService.list(workingRootNodeRef);
// check
String[] expectedNames = new String[]
{ NAME_L0_FILE_A, NAME_L0_FILE_B, NAME_L0_FOLDER_A, NAME_L0_FOLDER_B, NAME_L0_FOLDER_C };
checkFileList(files, 2, 3, expectedNames);
}
finally
{
I18NUtil.setContentLocale(savedLocale);
}
}
public void testListPage() throws Exception
{