diff --git a/rest-api/src/test/java/lcsb/mapviewer/api/convert/ConvertRestImplTest.java b/rest-api/src/test/java/lcsb/mapviewer/api/convert/ConvertRestImplTest.java index 47303b49d9dd4e824b2f2f7445f3b23c27da3aa8..2b29e95d8e015f4411f93dea2bdf25390f37b6a5 100644 --- a/rest-api/src/test/java/lcsb/mapviewer/api/convert/ConvertRestImplTest.java +++ b/rest-api/src/test/java/lcsb/mapviewer/api/convert/ConvertRestImplTest.java @@ -157,16 +157,36 @@ public class ConvertRestImplTest extends RestTestFunctions { @Test public void testCellDesigner2Sbml2Svg() throws Exception { try { - File file = new File("testFiles/convert/neuron_cd.xml"); - String content = FileUtils.readFileToString(file); - String resultSbml = convertRestImpl.convert(token, "CellDesigner_SBML", "SBML", content).toString(); - String resultSvg = convertRestImpl.converToImage(token, "SBML", "svg", resultSbml).toString(); - - // FileOutputStream outputStream = new FileOutputStream("sample-cd.png"); - // outputStream.write(convertRestImpl.converToImage(token, "CellDesigner_SBML", "png", content).toByteArray()); - // outputStream.close(); + File file = new File("testFiles/convert/neuron_cd.xml"); + String content = FileUtils.readFileToString(file); + String resultSbml = convertRestImpl.convert(token, "CellDesigner_SBML", "SBML", content).toString(); + String resultSvg = convertRestImpl.converToImage(token, "SBML", "svg", resultSbml).toString(); + + // FileOutputStream outputStream = new FileOutputStream("sample-cd.png"); + // outputStream.write(convertRestImpl.converToImage(token, "CellDesigner_SBML", "png", content).toByteArray()); + // outputStream.close(); + + assertTrue(resultSvg.contains("<rect")); + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } + + @Test + public void testCellDesigner2Sbml2CellDesignerSvg() throws Exception { + try { + File file = new File("testFiles/convert/neuron_cd.xml"); + String content = FileUtils.readFileToString(file); + String resultSbml = convertRestImpl.convert(token, "CellDesigner_SBML", "SBML", content).toString(); + String resultCellDesignerSbml = convertRestImpl.convert(token, "SBML", "CellDesigner_SBML", resultSbml).toString(); + String resultSvg = convertRestImpl.converToImage(token, "CellDesigner_SBML", "svg", resultCellDesignerSbml).toString(); + + // FileOutputStream outputStream = new FileOutputStream("sample-cd.png"); + // outputStream.write(convertRestImpl.converToImage(token, "CellDesigner_SBML", "png", content).toByteArray()); + // outputStream.close(); - assertTrue(resultSvg.contains("<rect")); + assertTrue(resultSvg.contains("<rect")); } catch (Exception e) { e.printStackTrace(); throw e;