/** * Tests {@link NetcdfStore#getMetadata()}. * * @throws DataStoreException if an error occurred while reading the netCDF file. */ @Test public void testGetMetadata() throws DataStoreException { final Metadata metadata; try (NetcdfStore store = create(TestData.NETCDF_2D_GEOGRAPHIC)) { metadata = store.getMetadata(); assertSame("Should be cached.", metadata, store.getMetadata()); } MetadataReaderTest.compareToExpected(metadata); }
/** * Tests {@link NetcdfStore#getConventionVersion()}. * * @throws DataStoreException if an error occurred while reading the netCDF file. */ @Test public void testGetConventionVersion() throws DataStoreException { final Version version; try (NetcdfStore store = create(TestData.NETCDF_2D_GEOGRAPHIC)) { version = store.getConventionVersion(); } assertEquals("major", 1, version.getMajor()); assertEquals("minor", 4, version.getMinor()); } }