Commit 6b35d387 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

catch and print exception

parent 0a11309f
......@@ -9,7 +9,8 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.apache.logging.log4j.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.Test;
import org.w3c.dom.Node;
......@@ -109,18 +110,23 @@ public class KineticsXmlParserTest extends CellDesignerTestFunctions {
@Test
public void testToXmlDefinition() throws Exception {
Model model = super.getModelForFile("testFiles/reactions/kinetics.xml");
CellDesignerElementCollection elements = new CellDesignerElementCollection();
for (Element element : model.getElements()) {
elements.getElementId(element);
try {
Model model = super.getModelForFile("testFiles/reactions/kinetics.xml");
CellDesignerElementCollection elements = new CellDesignerElementCollection();
for (Element element : model.getElements()) {
elements.getElementId(element);
}
SbmlKinetics kinetics = model.getReactionByReactionId("re1").getKinetics();
KineticsXmlParser parser = new KineticsXmlParser(model);
String xml = parser.toXml(model.getReactionByReactionId("re1").getKinetics(), elements);
assertNotNull(xml);
assertTrue(xml.indexOf(elements.getElementId(kinetics.getElements().iterator().next())) >= 0);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
SbmlKinetics kinetics = model.getReactionByReactionId("re1").getKinetics();
KineticsXmlParser parser = new KineticsXmlParser(model);
String xml = parser.toXml(model.getReactionByReactionId("re1").getKinetics(), elements);
assertNotNull(xml);
assertTrue(xml.indexOf(elements.getElementId(kinetics.getElements().iterator().next())) >= 0);
}
@Test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment