use of com.nixmash.blog.solr.model.Product in project nixmash-blog by mintster.
the class SolrLocationTests method testFindByNear.
@Test
public void testFindByNear() {
List<Product> found = repo.findByLocationNear(new Point(22.15, -90.85), new Distance(5));
locationAsserts(found);
}
use of com.nixmash.blog.solr.model.Product in project nixmash-blog by mintster.
the class SolrLocationTests method testFindByLocationWithin.
@Test
public void testFindByLocationWithin() {
List<Product> found = repo.findByLocationWithin(new Point(22.15, -90.85), new Distance(5));
locationAsserts(found);
}
use of com.nixmash.blog.solr.model.Product in project nixmash-blog by mintster.
the class SolrLocationTests method testFindByNearWithBox.
@Test
public void testFindByNearWithBox() {
// locatedinYonkers location: 22.17614, -90.87341
List<Product> found = repo.findByLocationNear(new Box(new Point(22, -91), new Point(23, -90)));
locationAsserts(found);
}
use of com.nixmash.blog.solr.model.Product in project nixmash-blog by mintster.
the class SolrLocationTests method missingLocationsProduceNegativePointValues.
@Test
public void missingLocationsProduceNegativePointValues() {
Product product = SolrTestUtils.createProduct(1002);
repo.save(product);
assertNull(product.getLocation());
assertThat(product.getPoint().getX(), is(lessThan((double) 0)));
}
use of com.nixmash.blog.solr.model.Product in project nixmash-blog by mintster.
the class SolrLocationTests method testFindByAnnotatedQueryNear.
@Test
public void testFindByAnnotatedQueryNear() {
List<Product> found = repo.findByLocationSomewhereNear(new Point(22.15, -90.85), new Distance(5));
locationAsserts(found);
}
Aggregations