22 #include "utilities.hpp"
31 #include "sbml/SBMLDocument.h"
32 #include "sbml/Model.h"
33 #include "sbml/Reaction.h"
62 CPPUNIT_ASSERT(pModel != NULL);
63 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
64 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
65 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
66 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
67 const CCompartment* pCompartment = pModel->getCompartments()[0];
68 CPPUNIT_ASSERT(pCompartment != NULL);
70 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 1);
71 CPPUNIT_ASSERT(pModel->getModelValues().size() == 0);
72 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
73 const CReaction* pReaction = pModel->getReactions()[0];
74 CPPUNIT_ASSERT(pReaction != NULL);
75 CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 0);
76 CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
77 CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
78 CPPUNIT_ASSERT(pReaction->isReversible() ==
false);
80 CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
81 const CCopasiParameter* pParameter = pReaction->getParameters().getParameter(0);
82 CPPUNIT_ASSERT(pReaction->isLocalParameter(0) ==
true);
83 CPPUNIT_ASSERT(pParameter != NULL);
85 CPPUNIT_ASSERT(fabs(((*(pParameter->getValue().pDOUBLE)) - 0.015) / 0.015) < 1e-12);
86 CPPUNIT_ASSERT(pParameter->getObjectName() ==
"v");
87 const CFunction* pFunction = pReaction->getFunction();
88 CPPUNIT_ASSERT(pFunction != NULL);
90 CPPUNIT_ASSERT(pFunction->getObjectName() ==
"Constant flux (irreversible)");
98 CPPUNIT_ASSERT(pModel != NULL);
99 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
100 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
101 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
102 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
103 const CCompartment* pCompartment = pModel->getCompartments()[0];
104 CPPUNIT_ASSERT(pCompartment != NULL);
106 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 1);
107 CPPUNIT_ASSERT(pModel->getModelValues().size() == 0);
108 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
109 const CReaction* pReaction = pModel->getReactions()[0];
110 CPPUNIT_ASSERT(pReaction != NULL);
111 CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 0);
112 CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
113 CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
114 CPPUNIT_ASSERT(pReaction->isReversible() ==
false);
116 CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
117 const CCopasiParameter* pParameter = pReaction->getParameters().getParameter(0);
118 CPPUNIT_ASSERT(pReaction->isLocalParameter(0) ==
true);
119 CPPUNIT_ASSERT(pParameter != NULL);
121 CPPUNIT_ASSERT(fabs(((*pParameter->getValue().pDOUBLE) - 0.015) / 0.015) < 1e-12);
122 CPPUNIT_ASSERT(pParameter->getObjectName() ==
"v");
123 const CFunction* pFunction = pReaction->getFunction();
124 CPPUNIT_ASSERT(pFunction != NULL);
126 CPPUNIT_ASSERT(pFunction->getObjectName() ==
"Constant flux (irreversible)");
130 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
131 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">"
132 " <model id=\"Model_1\" name=\"New Model\">"
134 " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
135 " <p>Model with one reaction that has constant flux kinetics.</p>"
138 " <listOfUnitDefinitions>"
139 " <unitDefinition id=\"volume\">"
141 " <unit kind=\"litre\" scale=\"-3\"/>"
144 " <unitDefinition id=\"substance\">"
146 " <unit kind=\"mole\" scale=\"-3\"/>"
149 " </listOfUnitDefinitions>"
150 " <listOfCompartments>"
151 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
152 " </listOfCompartments>"
154 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
157 " <reaction id=\"reaction1\" reversible=\"false\">"
159 " <speciesReference species=\"species_1\"/>"
162 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
165 " <ci> compartment_1 </ci>"
169 " <listOfParameters>"
170 " <parameter id=\"k\" value=\"0.015\"/>"
171 " </listOfParameters>"
174 " </listOfReactions>"
180 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
181 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">"
182 " <model id=\"Model_1\" name=\"New Model\">"
184 " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
185 " <p>Model with one reaction with constant flux kinetics.</p>"
188 " <listOfFunctionDefinitions>"
189 " <functionDefinition id=\"function_1\" name=\"MM\">"
190 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
198 " </functionDefinition>"
199 " </listOfFunctionDefinitions>"
200 " <listOfUnitDefinitions>"
201 " <unitDefinition id=\"volume\">"
203 " <unit kind=\"litre\" scale=\"-3\"/>"
206 " <unitDefinition id=\"substance\">"
208 " <unit kind=\"mole\" scale=\"-3\"/>"
211 " </listOfUnitDefinitions>"
212 " <listOfCompartments>"
213 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
214 " </listOfCompartments>"
216 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
219 " <reaction id=\"reaction1\" reversible=\"false\">"
221 " <speciesReference species=\"species_1\"/>"
224 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
227 " <ci> compartment_1 </ci>"
229 " <ci> function_1 </ci>"
234 " <listOfParameters>"
235 " <parameter id=\"k1\" value=\"0.015\"/>"
236 " </listOfParameters>"
239 " </listOfReactions>"
249 CPPUNIT_ASSERT(pModel != NULL);
250 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
251 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
252 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
253 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
254 const CCompartment* pCompartment = pModel->getCompartments()[0];
255 CPPUNIT_ASSERT(pCompartment != NULL);
257 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 1);
258 CPPUNIT_ASSERT(pModel->getModelValues().size() == 1);
259 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
260 const CReaction* pReaction = pModel->getReactions()[0];
261 CPPUNIT_ASSERT(pReaction != NULL);
262 CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 0);
263 CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
264 CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
265 CPPUNIT_ASSERT(pReaction->isReversible() ==
false);
267 CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
268 CPPUNIT_ASSERT(pReaction->isLocalParameter(0) ==
false);
269 const CFunction* pFunction = pReaction->getFunction();
270 CPPUNIT_ASSERT(pFunction != NULL);
272 CPPUNIT_ASSERT(pFunction->getObjectName() ==
"Constant flux (irreversible)");
280 CPPUNIT_ASSERT(pModel != NULL);
281 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
282 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
283 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
284 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
285 const CCompartment* pCompartment = pModel->getCompartments()[0];
286 CPPUNIT_ASSERT(pCompartment != NULL);
288 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 1);
289 CPPUNIT_ASSERT(pModel->getModelValues().size() == 1);
290 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
291 const CReaction* pReaction = pModel->getReactions()[0];
292 CPPUNIT_ASSERT(pReaction != NULL);
293 CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 0);
294 CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
295 CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
296 CPPUNIT_ASSERT(pReaction->isReversible() ==
false);
298 CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
299 CPPUNIT_ASSERT(pReaction->isLocalParameter(0) ==
false);
300 const CFunction* pFunction = pReaction->getFunction();
301 CPPUNIT_ASSERT(pFunction != NULL);
303 CPPUNIT_ASSERT(pFunction->getObjectName() ==
"Constant flux (irreversible)");
307 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
308 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">"
309 " <model id=\"Model_1\" name=\"New Model\">"
311 " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
312 " <p>Model with one reaction that has constant flux kinetics.</p>"
315 " <listOfUnitDefinitions>"
316 " <unitDefinition id=\"volume\">"
318 " <unit kind=\"litre\" scale=\"-3\"/>"
321 " <unitDefinition id=\"substance\">"
323 " <unit kind=\"mole\" scale=\"-3\"/>"
326 " </listOfUnitDefinitions>"
327 " <listOfCompartments>"
328 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
329 " </listOfCompartments>"
331 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
333 " <listOfParameters>"
334 " <parameter id=\"parameter_1\" name=\"K\" value=\"1.3\"/>"
335 " </listOfParameters>"
337 " <reaction id=\"reaction1\" reversible=\"false\">"
339 " <speciesReference species=\"species_1\"/>"
342 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
345 " <ci> compartment_1 </ci>"
346 " <ci> parameter_1 </ci>"
351 " </listOfReactions>"
357 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
358 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">"
359 " <model id=\"Model_1\" name=\"New Model\">"
361 " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
362 " <p>Model with one reaction with constant flux kinetics.</p>"
365 " <listOfFunctionDefinitions>"
366 " <functionDefinition id=\"function_1\" name=\"MM\">"
367 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
375 " </functionDefinition>"
376 " </listOfFunctionDefinitions>"
377 " <listOfUnitDefinitions>"
378 " <unitDefinition id=\"volume\">"
380 " <unit kind=\"litre\" scale=\"-3\"/>"
383 " <unitDefinition id=\"substance\">"
385 " <unit kind=\"mole\" scale=\"-3\"/>"
388 " </listOfUnitDefinitions>"
389 " <listOfCompartments>"
390 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
391 " </listOfCompartments>"
393 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
395 " <listOfParameters>"
396 " <parameter id=\"parameter_1\" name=\"K\" value=\"1.3\"/>"
397 " </listOfParameters>"
399 " <reaction id=\"reaction1\" reversible=\"false\">"
401 " <speciesReference species=\"species_1\"/>"
404 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
407 " <ci> compartment_1 </ci>"
409 " <ci> function_1 </ci>"
410 " <ci> parameter_1 </ci>"
416 " </listOfReactions>"
426 CPPUNIT_ASSERT(pModel != NULL);
427 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
428 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
429 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
430 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
431 const CCompartment* pCompartment = pModel->getCompartments()[0];
432 CPPUNIT_ASSERT(pCompartment != NULL);
434 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 2);
435 CPPUNIT_ASSERT(pModel->getModelValues().size() == 0);
436 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
437 const CReaction* pReaction = pModel->getReactions()[0];
438 CPPUNIT_ASSERT(pReaction != NULL);
439 CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
440 CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
441 CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
442 CPPUNIT_ASSERT(pReaction->isReversible() ==
true);
444 CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
445 const CCopasiParameter* pParameter = pReaction->getParameters().getParameter(0);
446 CPPUNIT_ASSERT(pReaction->isLocalParameter(0) ==
true);
447 CPPUNIT_ASSERT(pParameter != NULL);
449 CPPUNIT_ASSERT(fabs(((*(pParameter->getValue().pDOUBLE)) - 0.015) / 0.015) < 1e-12);
450 CPPUNIT_ASSERT(pParameter->getObjectName() ==
"v");
451 const CFunction* pFunction = pReaction->getFunction();
452 CPPUNIT_ASSERT(pFunction != NULL);
454 CPPUNIT_ASSERT(pFunction->getObjectName() ==
"Constant flux (reversible)");
462 CPPUNIT_ASSERT(pModel != NULL);
463 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
464 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
465 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
466 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
467 const CCompartment* pCompartment = pModel->getCompartments()[0];
468 CPPUNIT_ASSERT(pCompartment != NULL);
470 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 2);
471 CPPUNIT_ASSERT(pModel->getModelValues().size() == 0);
472 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
473 const CReaction* pReaction = pModel->getReactions()[0];
474 CPPUNIT_ASSERT(pReaction != NULL);
475 CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
476 CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
477 CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
478 CPPUNIT_ASSERT(pReaction->isReversible() ==
true);
480 CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
481 const CCopasiParameter* pParameter = pReaction->getParameters().getParameter(0);
482 CPPUNIT_ASSERT(pReaction->isLocalParameter(0) ==
true);
483 CPPUNIT_ASSERT(pParameter != NULL);
485 CPPUNIT_ASSERT(fabs(((*pParameter->getValue().pDOUBLE) - 0.015) / 0.015) < 1e-12);
486 CPPUNIT_ASSERT(pParameter->getObjectName() ==
"v");
487 const CFunction* pFunction = pReaction->getFunction();
488 CPPUNIT_ASSERT(pFunction != NULL);
490 CPPUNIT_ASSERT(pFunction->getObjectName() ==
"Constant flux (reversible)");
494 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
495 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">"
496 " <model id=\"Model_1\" name=\"New Model\">"
498 " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
499 " <p>Model with one reaction that has constant flux kinetics.</p>"
502 " <listOfUnitDefinitions>"
503 " <unitDefinition id=\"volume\">"
505 " <unit kind=\"litre\" scale=\"-3\"/>"
508 " <unitDefinition id=\"substance\">"
510 " <unit kind=\"mole\" scale=\"-3\"/>"
513 " </listOfUnitDefinitions>"
514 " <listOfCompartments>"
515 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
516 " </listOfCompartments>"
518 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
519 " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
522 " <reaction id=\"reaction1\" reversible=\"true\">"
524 " <speciesReference species=\"species_1\"/>"
525 " </listOfReactants>"
527 " <speciesReference species=\"species_2\"/>"
530 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
533 " <ci> compartment_1 </ci>"
537 " <listOfParameters>"
538 " <parameter id=\"k\" value=\"0.015\"/>"
539 " </listOfParameters>"
542 " </listOfReactions>"
548 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
549 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">"
550 " <model id=\"Model_1\" name=\"New Model\">"
552 " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
553 " <p>Model with one reaction with constant flux kinetics.</p>"
556 " <listOfFunctionDefinitions>"
557 " <functionDefinition id=\"function_1\" name=\"MM\">"
558 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
566 " </functionDefinition>"
567 " </listOfFunctionDefinitions>"
568 " <listOfUnitDefinitions>"
569 " <unitDefinition id=\"volume\">"
571 " <unit kind=\"litre\" scale=\"-3\"/>"
574 " <unitDefinition id=\"substance\">"
576 " <unit kind=\"mole\" scale=\"-3\"/>"
579 " </listOfUnitDefinitions>"
580 " <listOfCompartments>"
581 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
582 " </listOfCompartments>"
584 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
585 " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
588 " <reaction id=\"reaction1\" reversible=\"true\">"
590 " <speciesReference species=\"species_1\"/>"
591 " </listOfReactants>"
593 " <speciesReference species=\"species_2\"/>"
596 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
599 " <ci> compartment_1 </ci>"
601 " <ci> function_1 </ci>"
606 " <listOfParameters>"
607 " <parameter id=\"k1\" value=\"0.015\"/>"
608 " </listOfParameters>"
611 " </listOfReactions>"
621 CPPUNIT_ASSERT(pModel != NULL);
622 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
623 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
624 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
625 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
626 const CCompartment* pCompartment = pModel->getCompartments()[0];
627 CPPUNIT_ASSERT(pCompartment != NULL);
629 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 2);
630 CPPUNIT_ASSERT(pModel->getModelValues().size() == 1);
631 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
632 const CReaction* pReaction = pModel->getReactions()[0];
633 CPPUNIT_ASSERT(pReaction != NULL);
634 CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
635 CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
636 CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
637 CPPUNIT_ASSERT(pReaction->isReversible() ==
true);
639 CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
640 CPPUNIT_ASSERT(pReaction->isLocalParameter(0) ==
false);
641 const CFunction* pFunction = pReaction->getFunction();
642 CPPUNIT_ASSERT(pFunction != NULL);
644 CPPUNIT_ASSERT(pFunction->getObjectName() ==
"Constant flux (reversible)");
652 CPPUNIT_ASSERT(pModel != NULL);
653 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
654 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
655 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
656 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
657 const CCompartment* pCompartment = pModel->getCompartments()[0];
658 CPPUNIT_ASSERT(pCompartment != NULL);
660 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 2);
661 CPPUNIT_ASSERT(pModel->getModelValues().size() == 1);
662 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
663 const CReaction* pReaction = pModel->getReactions()[0];
664 CPPUNIT_ASSERT(pReaction != NULL);
665 CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
666 CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
667 CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
668 CPPUNIT_ASSERT(pReaction->isReversible() ==
true);
670 CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
671 CPPUNIT_ASSERT(pReaction->isLocalParameter(0) ==
false);
672 const CFunction* pFunction = pReaction->getFunction();
673 CPPUNIT_ASSERT(pFunction != NULL);
675 CPPUNIT_ASSERT(pFunction->getObjectName() ==
"Constant flux (reversible)");
679 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
680 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">"
681 " <model id=\"Model_1\" name=\"New Model\">"
683 " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
684 " <p>Model with one reaction that has constant flux kinetics.</p>"
687 " <listOfUnitDefinitions>"
688 " <unitDefinition id=\"volume\">"
690 " <unit kind=\"litre\" scale=\"-3\"/>"
693 " <unitDefinition id=\"substance\">"
695 " <unit kind=\"mole\" scale=\"-3\"/>"
698 " </listOfUnitDefinitions>"
699 " <listOfCompartments>"
700 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
701 " </listOfCompartments>"
703 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
704 " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
706 " <listOfParameters>"
707 " <parameter id=\"parameter_1\" name=\"K\" value=\"1.3\"/>"
708 " </listOfParameters>"
710 " <reaction id=\"reaction1\" reversible=\"true\">"
712 " <speciesReference species=\"species_1\"/>"
713 " </listOfReactants>"
715 " <speciesReference species=\"species_2\"/>"
718 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
721 " <ci> compartment_1 </ci>"
722 " <ci> parameter_1 </ci>"
727 " </listOfReactions>"
733 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
734 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">"
735 " <model id=\"Model_1\" name=\"New Model\">"
737 " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
738 " <p>Model with one reaction with constant flux kinetics.</p>"
741 " <listOfFunctionDefinitions>"
742 " <functionDefinition id=\"function_1\" name=\"MM\">"
743 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
751 " </functionDefinition>"
752 " </listOfFunctionDefinitions>"
753 " <listOfUnitDefinitions>"
754 " <unitDefinition id=\"volume\">"
756 " <unit kind=\"litre\" scale=\"-3\"/>"
759 " <unitDefinition id=\"substance\">"
761 " <unit kind=\"mole\" scale=\"-3\"/>"
764 " </listOfUnitDefinitions>"
765 " <listOfCompartments>"
766 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
767 " </listOfCompartments>"
769 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
770 " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"1\"/>"
772 " <listOfParameters>"
773 " <parameter id=\"parameter_1\" name=\"K\" value=\"1.3\"/>"
774 " </listOfParameters>"
776 " <reaction id=\"reaction1\" reversible=\"true\">"
778 " <speciesReference species=\"species_1\"/>"
779 " </listOfReactants>"
781 " <speciesReference species=\"species_2\"/>"
784 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
787 " <ci> compartment_1 </ci>"
789 " <ci> function_1 </ci>"
790 " <ci> parameter_1 </ci>"
796 " </listOfReactions>"
static const char * MODEL_STRING1
void test_import_reaction_with_constant_flux_function_global_parameter()
static const char * MODEL_STRING8
void test_import_reaction_with_constant_flux_function()
static const char * MODEL_STRING2
static const char * MODEL_STRING7
static const char * MODEL_STRING5
static const char * MODEL_STRING4
void test_import_reaction_with_constant_flux_reversible_function_global_parameter()
void test_import_reaction_with_constant_flux_reversible_function()
void test_import_reaction_with_constant_flux_reversible_global_parameter()
static const char * MODEL_STRING6
static CCopasiDataModel * pCOPASIDATAMODEL
static CCopasiDataModel * addDatamodel()
static const char * MODEL_STRING3
void test_import_reaction_with_constant_flux()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
static void init(int argc, char *argv[], const bool &withGui=false)
void test_import_reaction_with_constant_flux_reversible()
void test_import_reaction_with_constant_flux_global_parameter()