@Test public void testGetSearchableElements() { final List<DMNSearchableElement> elements = index .getSearchableElements() .stream() .sorted(Comparator.comparing(DMNSearchableElement::getText)) .collect(Collectors.toList()); assertEquals(7, elements.size()); assertEquals(cellStringValue1, elements.get(0).getText()); assertEquals(cellStringValue2, elements.get(1).getText()); assertEquals(cellStringValue3, elements.get(2).getText()); assertEquals(cellStringValue4, elements.get(3).getText()); assertEquals(cellStringValue5, elements.get(4).getText()); assertEquals(cellStringValue6, elements.get(5).getText()); assertEquals(cellStringValue7, elements.get(6).getText()); elements.get(0).onFound().execute(); elements.get(1).onFound().execute(); elements.get(2).onFound().execute(); elements.get(3).onFound().execute(); elements.get(4).onFound().execute(); elements.get(5).onFound().execute(); elements.get(6).onFound().execute(); verify(dmnGridHelper).highlightCell(0, 0, gridWidget1); verify(dmnGridHelper).highlightCell(0, 1, gridWidget1); verify(dmnGridHelper).highlightCell(0, 0, gridWidget2); verify(dmnGridHelper).highlightCell(1, 0, gridWidget2); verify(dmnGridHelper).highlightCell(0, 0, gridWidget3); verify(dmnGridHelper).highlightCell(0, 1, gridWidget3); verify(dmnGridHelper).highlightCell(1, 0, gridWidget3); }
@Override public List<DMNSearchableElement> getSearchableElements() { return dmnGridHelper .getGridWidgets() .stream() .flatMap(gridWidget -> getSearchableElements(gridWidget).stream()) .collect(Collectors.toList()); }
DMNGridSubIndex implements DMNSubIndex { @Override public List<DMNSearchableElement> getSearchableElements() { return dmnGridHelper .getGridWidgets() .stream() .flatMap(gridWidget -> getSearchableElements(gridWidget).stream()) .collect(Collectors.toList()); } }
DMNGridSubIndex implements DMNSubIndex { @Override public List<DMNSearchableElement> getSearchableElements() { return dmnGridHelper .getGridWidgets() .stream() .flatMap(gridWidget -> getSearchableElements(gridWidget).stream()) .collect(Collectors.toList()); } @Inject  DMNGridSubIndex(final DMNGridHelper dmnGridHelper); }
DMNGridSubIndex implements DMNSubIndex { @Override public List<DMNSearchableElement> getSearchableElements() { return dmnGridHelper .getGridWidgets() .stream() .flatMap(gridWidget -> getSearchableElements(gridWidget).stream()) .collect(Collectors.toList()); } @Inject  DMNGridSubIndex(final DMNGridHelper dmnGridHelper); @Override List<DMNSearchableElement> getSearchableElements(); @Override void onSearchClosed(); @Override void onNoResultsFound(); }
DMNGridSubIndex implements DMNSubIndex { @Override public List<DMNSearchableElement> getSearchableElements() { return dmnGridHelper .getGridWidgets() .stream() .flatMap(gridWidget -> getSearchableElements(gridWidget).stream()) .collect(Collectors.toList()); } @Inject  DMNGridSubIndex(final DMNGridHelper dmnGridHelper); @Override List<DMNSearchableElement> getSearchableElements(); @Override void onSearchClosed(); @Override void onNoResultsFound();  }