ALF-9098 - Handle trailing wildcards in the new (canned query powered) getPerson call

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28456 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2011-06-17 13:46:21 +00:00
parent f3902d9eb5
commit 9913b46e54
2 changed files with 25 additions and 1 deletions

View File

@@ -598,6 +598,17 @@ public class PersonTest extends TestCase
filters.clear();
filters.add(new Pair<QName, String>(ContentModel.PROP_USERNAME, "a"));
assertEquals(1, personService.getPeople(filters, true, null, pr).getPage().size()); // includes "admin"
// a* is the same as a
filters.clear();
filters.add(new Pair<QName, String>(ContentModel.PROP_USERNAME, "a*"));
assertEquals(1, personService.getPeople(filters, true, null, pr).getPage().size()); // includes "admin"
// * means everyone
filters.clear();
filters.add(new Pair<QName, String>(ContentModel.PROP_USERNAME, "*"));
assertEquals(5, getPeopleCount());
assertEquals(5, personService.getPeople(filters, true, null, pr).getPage().size());
}
public void testPeopleSortingPaging()