@Test public void testSearchEntryWithoutResults() { loadTestFunctions(); searchService.searchEntry("SOME_OTHER_FUNCTION", searchCallback); verify(searchCallback).afterSearch(searchResultsCaptor.capture()); assertEquals(0, searchResultsCaptor.getValue().size()); }
@Override public void searchEntry(final String key, final LiveSearchCallback<String> callback) { LiveSearchResults<String> results = new LiveSearchResults<>(); if (options.containsKey(key)) { results.add(key, options.get(key)); } callback.afterSearch(results); }
FunctionSearchService implements LiveSearchService<String> { @Override public void searchEntry(final String key, final LiveSearchCallback<String> callback) { LiveSearchResults<String> results = new LiveSearchResults<>(); if (options.containsKey(key)) { results.add(key, options.get(key)); } callback.afterSearch(results); } }
FunctionSearchService implements LiveSearchService<String> { @Override public void searchEntry(final String key, final LiveSearchCallback<String> callback) { LiveSearchResults<String> results = new LiveSearchResults<>(); if (options.containsKey(key)) { results.add(key, options.get(key)); } callback.afterSearch(results); } @Inject  FunctionSearchService(final ConditionEditorAvailableFunctionsService availableFunctionsService,
                                 final FunctionNamingService functionNamingService); }
FunctionSearchService implements LiveSearchService<String> { @Override public void searchEntry(final String key, final LiveSearchCallback<String> callback) { LiveSearchResults<String> results = new LiveSearchResults<>(); if (options.containsKey(key)) { results.add(key, options.get(key)); } callback.afterSearch(results); } @Inject  FunctionSearchService(final ConditionEditorAvailableFunctionsService availableFunctionsService,
                                 final FunctionNamingService functionNamingService); void init(final ClientSession session); void reload(final String type,
                       final Command onSuccess); void clear(); @Override void search(final String pattern,
                       final int maxResults,
                       final LiveSearchCallback<String> callback); @Override void searchEntry(final String key,
                            final LiveSearchCallback<String> callback); FunctionDef getFunction(final String function); }
FunctionSearchService implements LiveSearchService<String> { @Override public void searchEntry(final String key, final LiveSearchCallback<String> callback) { LiveSearchResults<String> results = new LiveSearchResults<>(); if (options.containsKey(key)) { results.add(key, options.get(key)); } callback.afterSearch(results); } @Inject  FunctionSearchService(final ConditionEditorAvailableFunctionsService availableFunctionsService,
                                 final FunctionNamingService functionNamingService); void init(final ClientSession session); void reload(final String type,
                       final Command onSuccess); void clear(); @Override void search(final String pattern,
                       final int maxResults,
                       final LiveSearchCallback<String> callback); @Override void searchEntry(final String key,
                            final LiveSearchCallback<String> callback); FunctionDef getFunction(final String function);  }