Ejemplo n.º 1
0
  @Test
  public void test_search_twoKeys_Any_noMatch() {
    UserSearchRequest request = new UserSearchRequest();
    request.addExternalIds(ExternalId.of("E", "H"), ExternalId.of("A", "D"));
    UserSearchResult test = _usrMaster.search(request);

    assertEquals(0, test.getDocuments().size());
  }
Ejemplo n.º 2
0
  @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());
  }
Ejemplo n.º 3
0
  @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());
  }
Ejemplo n.º 4
0
  @Test
  public void test_search_threeKeys_All_AB_CD_GH() {
    UserSearchRequest request = new UserSearchRequest();
    request.addExternalIds(
        ExternalId.of("A", "B"), ExternalId.of("C", "D"), ExternalId.of("G", "H"));
    request.getExternalIdSearch().setSearchType(ExternalIdSearchType.ALL);
    UserSearchResult test = _usrMaster.search(request);

    assertEquals(1, test.getDocuments().size());
    assert102(test.getDocuments().get(0));
  }
Ejemplo n.º 5
0
  @Test
  public void test_search_twoKeys_All_CD_EF() {
    UserSearchRequest request = new UserSearchRequest();
    request.addExternalIds(ExternalId.of("C", "D"), ExternalId.of("E", "F"));
    request.getExternalIdSearch().setSearchType(ExternalIdSearchType.ALL);
    UserSearchResult test = _usrMaster.search(request);

    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert202(test.getDocuments().get(1));
  }
Ejemplo n.º 6
0
  @Test
  public void test_search_twoKeys_EF_GH() {
    UserSearchRequest request = new UserSearchRequest();
    request.addExternalIds(ExternalId.of("E", "F"), ExternalId.of("G", "H"));
    UserSearchResult test = _usrMaster.search(request);

    assertEquals(3, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert102(test.getDocuments().get(1));
    assert202(test.getDocuments().get(2));
  }