@Test public void testSearchWhenKeywordIsEmpty() { final List<DataType> results = searchEngine.search(""); verifyNoMoreInteractions(dataTypeStore); assertTrue(results.isEmpty()); }
public List<DataType> search(final String keyword) { final List<DataType> results = new ArrayList<>(); for (final DataType dataType : findByName(keyword)) { results.addAll(getStack(dataType)); } return results; }
DataTypeSearchEngine { public List<DataType> search(final String keyword) { final List<DataType> results = new ArrayList<>(); for (final DataType dataType : findByName(keyword)) { results.addAll(getStack(dataType)); } return results; } }
DataTypeSearchEngine { public List<DataType> search(final String keyword) { final List<DataType> results = new ArrayList<>(); for (final DataType dataType : findByName(keyword)) { results.addAll(getStack(dataType)); } return results; } @Inject  DataTypeSearchEngine(final DataTypeStore dataTypeStore); }
DataTypeSearchEngine { public List<DataType> search(final String keyword) { final List<DataType> results = new ArrayList<>(); for (final DataType dataType : findByName(keyword)) { results.addAll(getStack(dataType)); } return results; } @Inject  DataTypeSearchEngine(final DataTypeStore dataTypeStore); List<DataType> search(final String keyword); }
DataTypeSearchEngine { public List<DataType> search(final String keyword) { final List<DataType> results = new ArrayList<>(); for (final DataType dataType : findByName(keyword)) { results.addAll(getStack(dataType)); } return results; } @Inject  DataTypeSearchEngine(final DataTypeStore dataTypeStore); List<DataType> search(final String keyword);  }