use of org.openlca.ilcd.processes.Process in project olca-modules by GreenDelta.
the class WrapperTest method testExchanges.
@Test
public void testExchanges() {
InputStream in = getClass().getResourceAsStream("sdk_sample_process.xml");
Process p = JAXB.unmarshal(in, Process.class);
Assert.assertEquals(2, p.exchanges.size());
Assert.assertEquals(2, p.lciaResults.length);
}
use of org.openlca.ilcd.processes.Process in project olca-modules by GreenDelta.
the class XmlBinderTest method makeProcess.
private Process makeProcess() {
Process process = new Process();
ProcessInfo pi = new ProcessInfo();
DataSetInfo info = new DataSetInfo();
process.processInfo = pi;
pi.dataSetInfo = info;
info.uuid = UUID.randomUUID().toString();
return process;
}
use of org.openlca.ilcd.processes.Process in project olca-modules by GreenDelta.
the class ProcessBagTest method setUp.
@Before
public void setUp() throws Exception {
try (InputStream stream = this.getClass().getResourceAsStream("process.xml")) {
XmlBinder binder = new XmlBinder();
Process process = binder.fromStream(Process.class, stream);
bag = new ProcessBag(process, "en");
}
}
use of org.openlca.ilcd.processes.Process in project olca-modules by GreenDelta.
the class ILCDImportExportTest method testF_Process.
@Test
public void testF_Process() {
String id = "76d6aaa4-37e2-40b2-994c-03292b600074";
var dataSet = importConf.store().get(Process.class, id);
var process = new ProcessImport(importConf).run(dataSet);
assertEquals(id, process.refId);
new ProcessExport(exportConf).run(process);
assertTrue(exportConf.store.contains(Process.class, id));
}
use of org.openlca.ilcd.processes.Process in project olca-modules by GreenDelta.
the class RefTreeTest method testFlowRef.
@Test
public void testFlowRef() {
Process p = new Process();
Exchange e = new Exchange();
p.exchanges.add(e);
Ref flowRef = new Ref();
flowRef.uuid = "123";
e.flow = flowRef;
RefTree tree = RefTree.create(p);
assertEquals(1, tree.root.childs.size());
Ref ref = tree.getRefs().get(0);
assertEquals("123", ref.uuid);
}
Aggregations