Search in sources :

Example 1 with DataSetType

use of org.openlca.ilcd.commons.DataSetType in project olca-modules by GreenDelta.

the class SchemaValidatorTest method testPass.

@Test
@Ignore
public void testPass() {
    DataSetType[] types = { DataSetType.LCIA_METHOD, DataSetType.PROCESS, DataSetType.FLOW, DataSetType.FLOW_PROPERTY, DataSetType.SOURCE, DataSetType.CONTACT, DataSetType.UNIT_GROUP };
    String[] dataSets = { "sdk_sample_lciamethod.xml", "sdk_sample_process.xml", "sdk_sample_flow.xml", "sdk_sample_flowproperty.xml", "sdk_sample_source.xml", "sdk_sample_contact.xml", "sdk_sample_unitgroup.xml" };
    for (int i = 0; i < types.length; i++) {
        String url = "/org/openlca/ilcd/io/" + dataSets[i];
        InputStream stream = getClass().getResourceAsStream(url);
        boolean valid = validator.isValid(stream, types[i]);
        Assert.assertTrue("Validation failed: " + url, valid);
    }
}
Also used : DataSetType(org.openlca.ilcd.commons.DataSetType) InputStream(java.io.InputStream) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

InputStream (java.io.InputStream)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 DataSetType (org.openlca.ilcd.commons.DataSetType)1