"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/plugin/mongodb/src/test/java/org/geotools/data/mongodb/MongoFeatureSourceTest.java" between
geotools-24.0-project.zip and geotools-24.1-project.zip

About: GeoTools (The Open Source Java GIS Toolkit) is a Java code library which provides standards compliant methods for the manipulation of geospatial data.

MongoFeatureSourceTest.java  (geotools-24.0-project):MongoFeatureSourceTest.java  (geotools-24.1-project)
skipping to change at line 415 skipping to change at line 415
dates.add((Date) feature.getAttribute("properties.dateProperty")); dates.add((Date) feature.getAttribute("properties.dateProperty"));
} }
assertEquals(dates.size(), 3); assertEquals(dates.size(), 3);
Date first = dates.get(0); Date first = dates.get(0);
Date second = dates.get(1); Date second = dates.get(1);
Date third = dates.get(2); Date third = dates.get(2);
assertTrue(first.before(second)); assertTrue(first.before(second));
assertTrue(second.before(third)); assertTrue(second.before(third));
} }
public void testNullSortBy() throws Exception {
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
SortBy[] sorts = new SortBy[] {SortBy.NATURAL_ORDER};
SimpleFeatureSource source = dataStore.getFeatureSource("ft1");
Query q = new Query("ft1", Filter.INCLUDE);
q.setSortBy(sorts);
SimpleFeatureCollection features = source.getFeatures(q);
SimpleFeatureIterator it = features.features();
List<Double> doubleValues = new ArrayList<>(3);
while (it.hasNext()) {
SimpleFeature feature = it.next();
doubleValues.add((Double) feature.getAttribute("properties.doublePro
perty"));
}
assertEquals(doubleValues.size(), 3);
}
private void checkBinaryLogicOperatorFilterSplitting(BinaryLogicOperator fil ter) private void checkBinaryLogicOperatorFilterSplitting(BinaryLogicOperator fil ter)
throws Exception { throws Exception {
SimpleFeatureSource source = dataStore.getFeatureSource("ft1"); SimpleFeatureSource source = dataStore.getFeatureSource("ft1");
assertTrue(source instanceof MongoFeatureStore); assertTrue(source instanceof MongoFeatureStore);
MongoFeatureStore mongoStore = (MongoFeatureStore) source; MongoFeatureStore mongoStore = (MongoFeatureStore) source;
MongoFeatureSource mongoSource = mongoStore.delegate; MongoFeatureSource mongoSource = mongoStore.delegate;
Filter[] filters = mongoSource.splitFilter(filter); Filter[] filters = mongoSource.splitFilter(filter);
Filter preFilter = filters[0]; Filter preFilter = filters[0];
assertTrue(preFilter instanceof BinaryLogicOperator); assertTrue(preFilter instanceof BinaryLogicOperator);
Filter postFilter = filters[1]; Filter postFilter = filters[1];
 End of changes. 1 change blocks. 
0 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)