Esempio n. 1
0
 /** Tests iterations that return names. */
 private void testMatch(CheckIterator check) {
   service.addAll(
       Arrays.asList("able", "al", "alan", "alex", "ann", "bill", "billy", "bob", "bobby"));
   check.checkContents("", "able", "al", "alan", "alex", "ann", "bill", "billy", "bob", "bobby");
   check.checkContents("a", "able", "al", "alan", "alex", "ann");
   check.checkContents("al", "alan", "alex");
   check.checkContents("ale", "alex");
   check.checkContents("alex");
   check.checkContents("b", "bill", "billy", "bob", "bobby");
   check.checkContents("bill", "billy");
   check.checkContents("billy");
 }
Esempio n. 2
0
 /** Tests iterations that return no names. */
 private void testNoMatch(CheckIterator check) {
   check.checkContents("");
   service.addAll(Arrays.asList("bill", "bob"));
   check.checkContents("a");
   check.checkContents("ba");
   check.checkContents("billy");
   check.checkContents("bit");
   check.checkContents("boa");
   check.checkContents("bob");
   check.checkContents("bobby");
   check.checkContents("carl");
 }