Changeset 4862
- Timestamp:
- 04/01/14 09:00:14 (10 years ago)
- Location:
- vlo/branches/vlo-3.0/vlo-web-app/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/provider/FacetFieldValuesProvider.java
r4669 r4862 123 123 @Override 124 124 public boolean apply(Count input) { 125 return input.getName().toLowerCase(). startsWith(filterValue);125 return input.getName().toLowerCase().contains(filterValue); 126 126 } 127 127 }); -
vlo/branches/vlo-3.0/vlo-web-app/src/test/java/eu/clarin/cmdi/vlo/wicket/provider/FacetFieldValuesProviderTest.java
r4855 r4862 147 147 @Test 148 148 public void testFiltered() { 149 final Model filterModel = Model.of(" f");149 final Model filterModel = Model.of("th"); 150 150 final FacetFieldValuesProvider instance = new FacetFieldValuesProvider(Model.of(facetField), 10, new SortParam<FieldValuesOrder>(FieldValuesOrder.NAME, true)) { 151 151 … … 161 161 final Iterator<? extends FacetField.Count> result = instance.iterator(first, count); 162 162 163 //sorted by name, filtered on first character 'f'163 //sorted by name, filtered on presence of 'th' 164 164 assertTrue(result.hasNext()); 165 165 FacetField.Count valueCount = result.next(); 166 assertEquals("f irstvalue", valueCount.getName());166 assertEquals("fourth value", valueCount.getName()); 167 167 168 168 assertTrue(result.hasNext()); 169 169 valueCount = result.next(); 170 assertEquals(" fourthvalue", valueCount.getName());170 assertEquals("third value", valueCount.getName()); 171 171 172 172 assertFalse(result.hasNext());
Note: See TracChangeset
for help on using the changeset viewer.