...
 
Commits (1)
...@@ -421,7 +421,7 @@ public class AppliedFiltersConverter { ...@@ -421,7 +421,7 @@ public class AppliedFiltersConverter {
ValueRangeFilter vrf = (ValueRangeFilter) fv; ValueRangeFilter vrf = (ValueRangeFilter) fv;
nf.between = new Double[] { ((Number) vrf.getFrom()).doubleValue(), ((Number) vrf.getTo()).doubleValue() }; nf.between = new Double[] { ((Number) vrf.getFrom()).doubleValue(), ((Number) vrf.getTo()).doubleValue() };
} else if (fv instanceof LiteralValueFilter) { } else if (fv instanceof LiteralValueFilter) {
nf.eq = take1Number(af).doubleValue(); nf.eq = new HashSet<Double>(){{ add(take1Number(af).doubleValue()); }};
} }
} }
return nf; return nf;
......
...@@ -18,7 +18,6 @@ package org.genesys.test.catalog.api.v0; ...@@ -18,7 +18,6 @@ package org.genesys.test.catalog.api.v0;
import static org.hamcrest.Matchers.*; import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration; import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
......
...@@ -220,7 +220,7 @@ public class AccessionFilterTest { ...@@ -220,7 +220,7 @@ public class AccessionFilterTest {
AccessionFilter af = AccessionFilter.convert(filters); AccessionFilter af = AccessionFilter.convert(filters);
assertThat(af.geo, notNullValue()); assertThat(af.geo, notNullValue());
assertThat(af.geo.elevation, notNullValue()); assertThat(af.geo.elevation, notNullValue());
assertThat(af.geo.elevation.eq, is(10d)); assertTrue(af.geo.elevation.eq.contains(10d));
ElasticQueryBuilder esQb = new ElasticQueryBuilder(); ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null); af.buildQuery().accept(esQb, null);
......