Skip to content
Snippets Groups Projects
Commit bea4c798 authored by David Hoksza's avatar David Hoksza
Browse files

working celldesigner and sbgn converters

parent 65530971
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!418Formats conversion rest api
Pipeline #6440 passed
package lcsb.mapviewer.api.convert;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.io.File;
import org.apache.commons.io.FileUtils;
import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.AfterClass;
......@@ -15,9 +13,6 @@ import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import lcsb.mapviewer.api.RestTestFunctions;
import lcsb.mapviewer.model.map.MiriamType;
import lcsb.mapviewer.model.map.reaction.type.StateTransitionReaction;
import lcsb.mapviewer.model.map.species.GenericProtein;
public class ConvertRestImplTest extends RestTestFunctions {
......@@ -43,8 +38,11 @@ public class ConvertRestImplTest extends RestTestFunctions {
@Test
public void testCelDesigner2Sbml() throws Exception {
try {
String result = convertRestImpl.convert(token, "celldesigner", "sbml", "content");
assertTrue(result.length() > 0);
File file = new File("testFiles/convert/sample.sbgn");
String content = FileUtils.readFileToString(file);
String result = convertRestImpl.convert(token, "sbgn", "celldesigner", content);
System.out.print(result);
assertTrue(result.length() > 0);
} catch (Exception e) {
e.printStackTrace();
throw e;
......
This diff is collapsed.
This diff is collapsed.
File added
rest-api/testFiles/convert/sample.png

41.4 KiB

This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment