Ejemplo n.º 1
0
 @BeforeClass
 public static void setUpClass() throws Exception {
   wrapper = new WrapperNetcdfFile();
   URL resource = NcMLUtilTest.class.getClassLoader().getResource("QPE.20110214.009.105");
   testFile = new File(resource.getFile());
   destinationFile =
       new File(FileHelper.getTempDirectory() + File.separator + "temp.QPE.20110214.009.105");
 }
Ejemplo n.º 2
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))));
 }