Commit 3d5b4c0a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

data returned by api is cleaned

parent e831de89
......@@ -92,7 +92,7 @@ public class ElementRestImplTest extends RestTestFunctions {
protein.setStructuralState(state);
Map<String, Object> result = _elementsRestImpl.getOthersForElement(protein);
assertNotNull(result.get("modifications"));
assertEquals(state, result.get("structuralState"));
assertEquals(state.getValue(), result.get("structuralState"));
List<Map<String, Object>> modifications = (List<Map<String, Object>>) result.get("modifications");
assertEquals(1, modifications.size());
}
......@@ -100,16 +100,14 @@ public class ElementRestImplTest extends RestTestFunctions {
@SuppressWarnings("unchecked")
@Test
public void testGetModificationsForRna() throws Exception {
String state = "asd";
Rna rna = new Rna("s1");
ModificationSite mr = new ModificationSite();
mr.setState(ModificationState.ACETYLATED);
mr.setName("S250");
rna.addModificationSite(mr);
rna.setState(state);
Map<String, Object> result = _elementsRestImpl.getOthersForElement(rna);
assertNotNull(result.get("modifications"));
assertEquals(state, result.get("structuralState"));
assertEquals(null, result.get("structuralState"));
List<Map<String, Object>> modifications = (List<Map<String, Object>>) result.get("modifications");
assertEquals(1, modifications.size());
}
......@@ -117,15 +115,13 @@ public class ElementRestImplTest extends RestTestFunctions {
@SuppressWarnings("unchecked")
@Test
public void testGetModificationsForAntisenseRna() throws Exception {
String state = "asd";
AntisenseRna antisenseRna = new AntisenseRna("s1");
ModificationSite mr = new ModificationSite();
mr.setName("S250");
antisenseRna.addModificationSite(mr);
antisenseRna.setState(state);
Map<String, Object> result = _elementsRestImpl.getOthersForElement(antisenseRna);
assertNotNull(result.get("modifications"));
assertEquals(state, result.get("structuralState"));
assertEquals(null, result.get("structuralState"));
List<Map<String, Object>> modifications = (List<Map<String, Object>>) result.get("modifications");
assertEquals(1, modifications.size());
}
......
Supports Markdown
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