/** Test that distinct instances identically constructed are equal (location/count version). */ public void testLocationCountEquals() { assertEquals( "Identical simple feature types must be equal", buildLocationCountType(), buildLocationCountType()); }
/** Test that property order is significant to equals(). */ public void testOrderSignificantEquals() { SimpleFeatureType type1 = buildLocationCountType(); SimpleFeatureType type2 = buildCountLocationType(); assertFalse( "Simple feature types with properties in a different order must not be equal", type1.equals(type2)); }
/** Test that distinct instances identically constructed are equal (count/location version). */ public void testCountLocationEquals() { assertEquals( "Identical simple feature types must be equal", buildCountLocationType(), buildCountLocationType()); }
SimpleFeatureTypeBuilder builder = buildPartialBuilder(); builder.add("location", Point.class, (CoordinateReferenceSystem) null); assertNotNull(schema); assertEquals(SimpleFeatureTypeImpl.class, schema.getClass()); exec.awaitTermination(5, TimeUnit.SECONDS); } catch (InterruptedException e) { fail("Interrupted"); assertEquals(0, latch.getCount());
/** @return a simple feature type with count before location */ private SimpleFeatureType buildCountLocationType() { SimpleFeatureTypeBuilder builder = buildPartialBuilder(); builder.add("count", Integer.class); builder.add("location", Point.class, (CoordinateReferenceSystem) null); return builder.buildFeatureType(); }
/** @return a simple feature type with location before count */ private SimpleFeatureType buildLocationCountType() { SimpleFeatureTypeBuilder builder = buildPartialBuilder(); builder.add("location", Point.class, (CoordinateReferenceSystem) null); builder.add("count", Integer.class); return builder.buildFeatureType(); }
/** * Test that properties returned by getAttributeDescriptors() and getDescriptors() are the same * and in the same order. */ public void testConsistentIterationOrder() { SimpleFeatureType type = buildLocationCountType(); assertEquals( "FeatureType and SimpleFeatureType APIs must return the same descriptors in the same order", new ArrayList<PropertyDescriptor>(type.getAttributeDescriptors()), new ArrayList<PropertyDescriptor>(type.getDescriptors())); }