Search in sources :

Example 11 with Process

use of org.openlca.ilcd.processes.Process in project olca-modules by GreenDelta.

the class RefTreeTest method testProcessSample.

@Test
public void testProcessSample() {
    InputStream is = ProcessSampleTest.class.getResourceAsStream("sdk_sample_process.xml");
    Process p = JAXB.unmarshal(is, Process.class);
    RefTree tree = RefTree.create(p);
    assertTrue(tree.getRefs().size() > 2);
    int lciaResultCount = 0;
    for (Ref ref : tree.getRefs()) {
        if (ref.type == DataSetType.LCIA_METHOD) {
            assertTrue(ref.isValid());
            lciaResultCount++;
        }
    }
    // two references but with same uuid
    assertEquals(1, lciaResultCount);
// and version
}
Also used : Ref(org.openlca.ilcd.commons.Ref) InputStream(java.io.InputStream) Process(org.openlca.ilcd.processes.Process) ProcessSampleTest(org.openlca.ilcd.io.ProcessSampleTest) Test(org.junit.Test)

Aggregations

Process (org.openlca.ilcd.processes.Process)11 Test (org.junit.Test)7 InputStream (java.io.InputStream)4 ProcessSampleTest (org.openlca.ilcd.io.ProcessSampleTest)3 Ref (org.openlca.ilcd.commons.Ref)2 ProcessBag (org.openlca.ilcd.util.ProcessBag)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 Before (org.junit.Before)1 DataSetInfo (org.openlca.ilcd.processes.DataSetInfo)1 Exchange (org.openlca.ilcd.processes.Exchange)1 ProcessInfo (org.openlca.ilcd.processes.ProcessInfo)1 ProcessImport (org.openlca.io.ilcd.input.ProcessImport)1 ProcessExport (org.openlca.io.ilcd.output.ProcessExport)1