@Test public void testPopulateTransientPropertiesWithLoggedOutUser() { context.checking(new Expectations() { { one(fieldMatchDeterminer).determineFieldMatches(result1Explanation, searchText); will(returnValue(match1)); one(fieldMatchDeterminer).determineFieldMatches(result2Explanation, searchText); will(returnValue(match2)); } }); sut.populateTransientProperties(results, 0L, searchText); assertSame(match1, result1.getFieldMatch()); assertSame(match2, result2.getFieldMatch()); context.assertIsSatisfied(); }
public void populateTransientProperties(final List<ModelView> results, final long userPersonId, final String searchText) { for (ModelView result : results) { FieldMatch match = fieldMatchDeterminer.determineFieldMatches(result.getSearchIndexExplanationString(), searchText); result.setFieldMatch(match); } }
SearchResultAdditionalPropertyPopulator implements TransientPropertyPopulator { public void populateTransientProperties(final List<ModelView> results, final long userPersonId, final String searchText) { for (ModelView result : results) { FieldMatch match = fieldMatchDeterminer.determineFieldMatches(result.getSearchIndexExplanationString(), searchText); result.setFieldMatch(match); } } }
SearchResultAdditionalPropertyPopulator implements TransientPropertyPopulator { public void populateTransientProperties(final List<ModelView> results, final long userPersonId, final String searchText) { for (ModelView result : results) { FieldMatch match = fieldMatchDeterminer.determineFieldMatches(result.getSearchIndexExplanationString(), searchText); result.setFieldMatch(match); } } SearchResultAdditionalPropertyPopulator(final FieldMatchDeterminer inFieldMatchDeterminer); }
SearchResultAdditionalPropertyPopulator implements TransientPropertyPopulator { public void populateTransientProperties(final List<ModelView> results, final long userPersonId, final String searchText) { for (ModelView result : results) { FieldMatch match = fieldMatchDeterminer.determineFieldMatches(result.getSearchIndexExplanationString(), searchText); result.setFieldMatch(match); } } SearchResultAdditionalPropertyPopulator(final FieldMatchDeterminer inFieldMatchDeterminer); void populateTransientProperties(final List<ModelView> results, final long userPersonId,
            final String searchText); }
SearchResultAdditionalPropertyPopulator implements TransientPropertyPopulator { public void populateTransientProperties(final List<ModelView> results, final long userPersonId, final String searchText) { for (ModelView result : results) { FieldMatch match = fieldMatchDeterminer.determineFieldMatches(result.getSearchIndexExplanationString(), searchText); result.setFieldMatch(match); } } SearchResultAdditionalPropertyPopulator(final FieldMatchDeterminer inFieldMatchDeterminer); void populateTransientProperties(final List<ModelView> results, final long userPersonId,
            final String searchText);  }