Search in sources :

Example 11 with ProjectFile

use of es.bsc.compss.types.project.ProjectFile in project compss by bsc-wdc.

the class ProjectFileTest method rocciXML.

@Test
public void rocciXML() throws URISyntaxException, JAXBException, SAXException, ProjectFileValidationException, IOException {
    // Get XSD Schema path
    String xsd_path = new File(SCHEMA_PATH).toURI().getPath();
    // Get default resources file
    File rocciProject = new File(ROCCI_XML_PATH);
    // Instantiate ResourcesFile
    ProjectFile project = new ProjectFile(rocciProject, xsd_path, logger);
    // Checkers
    assertNotNull(project);
    File xml = new File(XML_TMP_PATH);
    project.toFile(xml);
    boolean compareFile = FileUtils.contentEquals(rocciProject, xml);
    assertEquals("Dump content not equal", true, compareFile);
}
Also used : ProjectFile(es.bsc.compss.types.project.ProjectFile) File(java.io.File) ProjectFile(es.bsc.compss.types.project.ProjectFile) Test(org.junit.Test)

Example 12 with ProjectFile

use of es.bsc.compss.types.project.ProjectFile in project compss by bsc-wdc.

the class ProjectFileTest method gridXML.

@Test
public void gridXML() throws URISyntaxException, JAXBException, SAXException, ProjectFileValidationException, IOException {
    // Get XSD Schema path
    String xsd_path = new File(SCHEMA_PATH).toURI().getPath();
    // Get default resources file
    File gridProject = new File(GRID_XML_PATH);
    // Instantiate ResourcesFile
    ProjectFile project = new ProjectFile(gridProject, xsd_path, logger);
    // Checkers
    assertNotNull(project);
    File xml = new File(XML_TMP_PATH);
    project.toFile(xml);
    boolean compareFile = FileUtils.contentEquals(gridProject, xml);
    assertEquals("Dump content not equal", true, compareFile);
}
Also used : ProjectFile(es.bsc.compss.types.project.ProjectFile) File(java.io.File) ProjectFile(es.bsc.compss.types.project.ProjectFile) Test(org.junit.Test)

Aggregations

ProjectFile (es.bsc.compss.types.project.ProjectFile)12 File (java.io.File)12 Test (org.junit.Test)11 Schema (javax.xml.validation.Schema)2 SchemaFactory (javax.xml.validation.SchemaFactory)2 ProjectFileValidationException (es.bsc.compss.types.project.exceptions.ProjectFileValidationException)1 ResourcesFile (es.bsc.compss.types.resources.ResourcesFile)1 ResourcesFileValidationException (es.bsc.compss.types.resources.exceptions.ResourcesFileValidationException)1 JAXBException (javax.xml.bind.JAXBException)1 SAXException (org.xml.sax.SAXException)1