@Test public void test_search_threeKeys_Exact_noMatch() { UserSearchRequest request = new UserSearchRequest(); request.addExternalIds(ExternalId.of("A", "B"), ExternalId.of("C", "D")); request.getExternalIdSearch().setSearchType(ExternalIdSearchType.EXACT); UserSearchResult test = _usrMaster.search(request); assertEquals(0, test.getDocuments().size()); }
@Test public void test_search_twoKeys_All_noMatch() { UserSearchRequest request = new UserSearchRequest(); request.addExternalIds(ExternalIdBundle.of(ExternalId.of("C", "D"), ExternalId.of("E", "H"))); request.getExternalIdSearch().setSearchType(ExternalIdSearchType.ALL); UserSearchResult test = _usrMaster.search(request); assertEquals(0, test.getDocuments().size()); }
@Test public void test_search_oneKey_None_CD_noMatch() { UserSearchRequest request = new UserSearchRequest(); request.addExternalId(ExternalId.of("C", "D")); request.getExternalIdSearch().setSearchType(ExternalIdSearchType.NONE); UserSearchResult test = _usrMaster.search(request); assertEquals(0, test.getDocuments().size()); }
@Test public void test_search_noKeys_None_allMatch() { UserSearchRequest request = new UserSearchRequest(); request.setExternalIdSearch(new ExternalIdSearch()); request.getExternalIdSearch().setSearchType(ExternalIdSearchType.NONE); UserSearchResult test = _usrMaster.search(request); assertEquals(_totalUsers, test.getDocuments().size()); }
@Test public void test_search_noKeys_Any_noMatch() { UserSearchRequest request = new UserSearchRequest(); request.setExternalIdSearch(new ExternalIdSearch()); request.getExternalIdSearch().setSearchType(ExternalIdSearchType.ANY); UserSearchResult test = _usrMaster.search(request); assertEquals(0, test.getDocuments().size()); }
// ------------------------------------------------------------------------- @Test public void test_search_oneKey_None_AB() { UserSearchRequest request = new UserSearchRequest(); request.addExternalId(ExternalId.of("A", "B")); request.getExternalIdSearch().setSearchType(ExternalIdSearchType.NONE); UserSearchResult test = _usrMaster.search(request); assertEquals(1, test.getDocuments().size()); assert202(test.getDocuments().get(0)); }
@Test public void test_search_oneKey_All_GH() { UserSearchRequest request = new UserSearchRequest(); request.addExternalId(ExternalId.of("G", "H")); request.getExternalIdSearch().setSearchType(ExternalIdSearchType.ALL); UserSearchResult test = _usrMaster.search(request); assertEquals(1, test.getDocuments().size()); assert102(test.getDocuments().get(0)); }
// ------------------------------------------------------------------------- @Test public void test_search_threeKeys_All_AB_CD_EF() { UserSearchRequest request = new UserSearchRequest(); request.addExternalIds( ExternalId.of("A", "B"), ExternalId.of("C", "D"), ExternalId.of("E", "F")); request.getExternalIdSearch().setSearchType(ExternalIdSearchType.ALL); UserSearchResult test = _usrMaster.search(request); assertEquals(1, test.getDocuments().size()); assert101(test.getDocuments().get(0)); }