Commit 114874c2 authored by Maxym Borodenko's avatar Maxym Borodenko

#315 Fixes for updated core filters

parent 4d56b721
......@@ -421,7 +421,7 @@ public class AppliedFiltersConverter {
ValueRangeFilter vrf = (ValueRangeFilter) fv;
nf.between = new Double[] { ((Number) vrf.getFrom()).doubleValue(), ((Number) vrf.getTo()).doubleValue() };
} else if (fv instanceof LiteralValueFilter) {
nf.eq = take1Number(af).doubleValue();
nf.eq = new HashSet<Double>(){{ add(take1Number(af).doubleValue()); }};
}
}
return nf;
......
......@@ -18,7 +18,6 @@ package org.genesys.test.catalog.api.v0;
import static org.hamcrest.Matchers.*;
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.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
......
......@@ -220,7 +220,7 @@ public class AccessionFilterTest {
AccessionFilter af = AccessionFilter.convert(filters);
assertThat(af.geo, notNullValue());
assertThat(af.geo.elevation, notNullValue());
assertThat(af.geo.elevation.eq, is(10d));
assertTrue(af.geo.elevation.eq.contains(10d));
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment