use of org.apache.sis.storage.StorageConnector in project sis by apache.
the class StoreProviderTest method testProbeContent.
/**
* Tests {@link StoreProvider#probeContent(StorageConnector)} method.
*
* @throws DataStoreException if en error occurred while reading the CSV file.
*/
@Test
public void testProbeContent() throws DataStoreException {
final StoreProvider p = new StoreProvider();
final StorageConnector c = new StorageConnector(StoreTest.testData());
assertEquals(ProbeResult.SUPPORTED, p.probeContent(c));
}
use of org.apache.sis.storage.StorageConnector in project sis by apache.
the class StoreTest method open.
/**
* Opens a CSV store on the test data for reading the lines as-is, without assembling them in a single trajectory.
*/
private static Store open() throws DataStoreException {
StorageConnector connector = new StorageConnector(testData());
connector.setOption(DataOptionKey.FOLIATION_REPRESENTATION, FoliationRepresentation.FRAGMENTED);
return new Store(null, connector);
}
use of org.apache.sis.storage.StorageConnector in project sis by apache.
the class LandsatStoreProviderTest method testProbeContentFromReader.
/**
* Tests {@link LandsatStoreProvider#probeContent(StorageConnector)} method.
*
* @throws DataStoreException if en error occurred while reading the test file.
*/
@Test
public void testProbeContentFromReader() throws DataStoreException {
final StorageConnector connector = new StorageConnector(LandsatReaderTest.class.getResourceAsStream("LandsatTest.txt"));
connector.setOption(OptionKey.ENCODING, StandardCharsets.UTF_8);
final LandsatStoreProvider provider = new LandsatStoreProvider();
assertEquals(ProbeResult.SUPPORTED, provider.probeContent(connector));
}
Aggregations