@Test public void testCreateNCML() throws ThreddsUtilitiesException, IOException { File test = NcMLUtil.createNcML(destinationFile.getCanonicalPath()); test.deleteOnExit(); assertThat(test, is(notNullValue())); assertThat(test.length(), is(not(new Long(0)))); }
@Test public void testTransformNCMLtoXML() throws ThreddsUtilitiesException, IOException { File ncmlFile = NcMLUtil.createNcML(destinationFile.getCanonicalPath()); ncmlFile.deleteOnExit(); String _xsltMetadataAssessmentToXML = NcMLUtilTest.class.getClassLoader().getResource("UnidataDDCount-xml.xsl").getPath(); File xmlFile = ThreddsTranslatorUtil.transform( _xsltMetadataAssessmentToXML, ncmlFile.getCanonicalPath(), FileHelper.getTempDirectory() + File.separator + "output.xml"); xmlFile.deleteOnExit(); assertThat(xmlFile.exists(), is(true)); assertThat(xmlFile.length(), is(not(new Long(0)))); }