23 lines
626 B
Java
23 lines
626 B
Java
package com.baeldung.geotools;
|
|
|
|
import static org.junit.Assert.assertNotNull;
|
|
|
|
import org.geotools.feature.DefaultFeatureCollection;
|
|
import org.geotools.feature.simple.SimpleFeatureBuilder;
|
|
import org.junit.Test;
|
|
import org.opengis.feature.simple.SimpleFeatureType;
|
|
|
|
public class GeoToolsUnitTest {
|
|
|
|
@Test
|
|
public void givenFeatureType_whenAddLocations_returnFeatureCollection() {
|
|
DefaultFeatureCollection collection = new DefaultFeatureCollection();
|
|
|
|
SimpleFeatureType CITY = ShapeFile.createFeatureType();
|
|
|
|
ShapeFile.addLocations(CITY, collection);
|
|
|
|
assertNotNull(collection);
|
|
}
|
|
}
|