use of org.springframework.data.repository.query.parser.PartTree in project spring-data-mongodb by spring-projects.
the class MongoQueryCreatorUnitTests method queryShouldAcceptSubclassOfDeclaredArgument.
// DATAMONGO-1588
@Test
public void queryShouldAcceptSubclassOfDeclaredArgument() {
PartTree tree = new PartTree("findByLocationNear", User.class);
ConvertingParameterAccessor accessor = getAccessor(converter, new GeoJsonPoint(-74.044502D, 40.689247D));
Query query = new MongoQueryCreator(tree, accessor, context).createQuery();
assertThat(query.getQueryObject().containsKey("location"), is(true));
}
Aggregations