DBaseFileAttributeProvider extends AbstractAttributeProvider { @Override @Pure public Collection<Attribute> getAllAttributes() { return this.accessor.getAllAttributes(); } DBaseFileAttributeProvider(DBaseFileAttributeAccessor accessor); @Override @SuppressWarnings("checkstyle:nofinalizer") @Deprecated(since = "17.0", forRemoval = true) void finalize(); @Pure URL getResource(); @Pure int getRecordNumber(); @Override void freeMemory(); @Override @Pure Collection<String> getAllAttributeNames(); @Override @Pure Collection<Attribute> getAllAttributes(); @Override @Pure Map<AttributeType, Collection<Attribute>> getAllAttributesByType(); @Override @Pure AttributeValue getAttribute(String name); @Override @Pure AttributeValue getAttribute(String name, AttributeValue default_value); @Override @Pure Attribute getAttributeObject(String name); @Override @Pure boolean hasAttribute(String name); @Override @Pure int getAttributeCount(); @Override @Pure void toMap(Map<String, Object> mapToFill);  }
@Test public void testGetAllAttributes() throws Exception { Collection<Attribute> attrs = this.provider.getAllAttributes(); assertNotNull(attrs); assertEquals(4,attrs.size()); Iterator<Attribute> iterator = attrs.iterator(); Attribute attr; assertTrue(iterator.hasNext()); attr = iterator.next(); assertEquals("SOURCE", attr.getName()); assertEquals(PHOTOGRAMMETRIE_VALUE, attr.getValue()); assertTrue(iterator.hasNext()); attr = iterator.next(); assertEquals("CATEGORIE", attr.getName()); assertEquals("Religieux", attr.getValue()); assertTrue(iterator.hasNext()); attr = iterator.next(); assertEquals("NATURE", attr.getName()); assertEquals("Eglise", attr.getValue()); assertTrue(iterator.hasNext()); attr = iterator.next(); assertEquals("HAUTEUR", attr.getName()); assertEquals(15., attr.getValue()); assertFalse(iterator.hasNext()); }