Commit df38f8ad authored by Piotr Gawron's avatar Piotr Gawron
Browse files

reactions that should be modifiers but are valid phenotype reactions don't crash upload

parent abcc5452
......@@ -55,9 +55,13 @@
<value>lcsb.mapviewer.model.map.reaction.type.BooleanLogicGateReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.DissociationReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.CatalysisReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.HeterodimerAssociationReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.InhibitionReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.KnownTransitionOmittedReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.ModulationReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.NegativeInfluenceReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.PhysicalStimulationReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.PositiveInfluenceReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.ReducedModulationReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.ReducedPhysicalStimulationReaction</value>
......@@ -66,7 +70,10 @@
<value>lcsb.mapviewer.model.map.reaction.type.TranscriptionReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.TranslationReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.TransportReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.TriggerReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.TruncationReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.UnknownCatalysisReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.UnknownInhibitionReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.UnknownNegativeInfluenceReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.UnknownPositiveInfluenceReaction</value>
<value>lcsb.mapviewer.model.map.reaction.type.UnknownReducedModulationReaction</value>
......
......@@ -34,6 +34,7 @@ import lcsb.mapviewer.model.map.model.ModelFullIndexed;
import lcsb.mapviewer.model.map.reaction.Product;
import lcsb.mapviewer.model.map.reaction.Reactant;
import lcsb.mapviewer.model.map.reaction.Reaction;
import lcsb.mapviewer.model.map.reaction.type.ModulationReaction;
import lcsb.mapviewer.model.map.reaction.type.TransportReaction;
import lcsb.mapviewer.model.map.species.Complex;
import lcsb.mapviewer.model.map.species.Element;
......@@ -205,6 +206,33 @@ public class ModelDaoTest extends PersistTestFunctions {
}
}
@Test
public void testModulationReaction() throws Exception {
try {
Model model = createModel();
Reaction reaction = new ModulationReaction();
reaction.addProduct(new Product(model.getElementByElementId("sa2")));
reaction.addReactant(new Reactant(model.getElementByElementId("sa1117")));
reaction.setIdReaction("re" + identifierCounter++);
model.addReaction(reaction);
project.addModel(model);
modelDao.add(model);
projectDao.update(project);
projectDao.evict(project);
modelDao.evict(model);
ModelData model2 = modelDao.getById(model.getId());
assertEquals(0, modelComparator.compare(model, new ModelFullIndexed(model2)));
project = projectDao.getById(project.getId());
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testModelWithParameters() throws Exception {
try {
......
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