コード例 #1
0
 public void test_matches_NONE() {
   ExternalIdSearch test = ExternalIdSearch.of(ExternalIdSearchType.NONE, _id11, _id12);
   assertEquals(false, test.matches(ImmutableSet.of(_id11, _id12)));
   assertEquals(false, test.matches(ImmutableSet.of(_id11, _id12, _id21)));
   assertEquals(false, test.matches(ImmutableSet.of(_id11)));
   assertEquals(false, test.matches(ImmutableSet.of(_id12)));
   assertEquals(true, test.matches(ImmutableSet.of(_id21)));
   assertEquals(true, test.matches(ImmutableSet.of()));
 }
コード例 #2
0
  public void test_matches1_ANY() {
    ExternalIdSearch test1 = ExternalIdSearch.of(ExternalIdSearchType.ANY, _id11);
    assertEquals(true, test1.matches(_id11));
    assertEquals(false, test1.matches(_id12));
    assertEquals(false, test1.alwaysMatches());

    ExternalIdSearch test2 = ExternalIdSearch.of(ExternalIdSearchType.ANY, _id11, _id21);
    assertEquals(true, test2.matches(_id11));
    assertEquals(false, test2.matches(_id12));
    assertEquals(true, test2.matches(_id21));
    assertEquals(false, test2.alwaysMatches());
  }