COPASI API  4.16.103
Public Member Functions | Static Protected Attributes | Private Member Functions | List of all members
test000066 Class Reference

#include <test000066.h>

Inheritance diagram for test000066:
Inheritance graph
[legend]
Collaboration diagram for test000066:
Collaboration graph
[legend]

Public Member Functions

void setUp ()
 
void tearDown ()
 
void test_import_reaction_with_constant_flux ()
 
void test_import_reaction_with_constant_flux_function ()
 
void test_import_reaction_with_constant_flux_function_global_parameter ()
 
void test_import_reaction_with_constant_flux_global_parameter ()
 
void test_import_reaction_with_constant_flux_reversible ()
 
void test_import_reaction_with_constant_flux_reversible_function ()
 
void test_import_reaction_with_constant_flux_reversible_function_global_parameter ()
 
void test_import_reaction_with_constant_flux_reversible_global_parameter ()
 

Static Protected Attributes

static const char * MODEL_STRING1
 
static const char * MODEL_STRING2
 
static const char * MODEL_STRING3
 
static const char * MODEL_STRING4
 
static const char * MODEL_STRING5
 
static const char * MODEL_STRING6
 
static const char * MODEL_STRING7
 
static const char * MODEL_STRING8
 
static CCopasiDataModelpCOPASIDATAMODEL = NULL
 

Private Member Functions

 CPPUNIT_TEST (test_import_reaction_with_constant_flux)
 
 CPPUNIT_TEST (test_import_reaction_with_constant_flux_global_parameter)
 
 CPPUNIT_TEST (test_import_reaction_with_constant_flux_function)
 
 CPPUNIT_TEST (test_import_reaction_with_constant_flux_function_global_parameter)
 
 CPPUNIT_TEST (test_import_reaction_with_constant_flux_reversible)
 
 CPPUNIT_TEST (test_import_reaction_with_constant_flux_reversible_global_parameter)
 
 CPPUNIT_TEST (test_import_reaction_with_constant_flux_reversible_function)
 
 CPPUNIT_TEST (test_import_reaction_with_constant_flux_reversible_function_global_parameter)
 
 CPPUNIT_TEST_SUITE (test000066)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 26 of file test000066.h.

Member Function Documentation

test000066::CPPUNIT_TEST ( test_import_reaction_with_constant_flux  )
private
test000066::CPPUNIT_TEST ( test_import_reaction_with_constant_flux_global_parameter  )
private
test000066::CPPUNIT_TEST ( test_import_reaction_with_constant_flux_function  )
private
test000066::CPPUNIT_TEST ( test_import_reaction_with_constant_flux_reversible  )
private
test000066::CPPUNIT_TEST ( test_import_reaction_with_constant_flux_reversible_function  )
private
test000066::CPPUNIT_TEST_SUITE ( test000066  )
private
test000066::CPPUNIT_TEST_SUITE_END ( )
private
void test000066::setUp ( )

Definition at line 44 of file test000066.cpp.

References CCopasiRootContainer::addDatamodel(), CCopasiRootContainer::init(), and pCOPASIDATAMODEL.

45 {
46  // Create the root container.
47  CCopasiRootContainer::init(0, NULL, false);
48  // Create the global data model.
50 }
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000066.h:48
static CCopasiDataModel * addDatamodel()
static void init(int argc, char *argv[], const bool &withGui=false)
void test000066::tearDown ( )

Definition at line 52 of file test000066.cpp.

References CCopasiRootContainer::destroy().

void test000066::test_import_reaction_with_constant_flux ( )

Definition at line 57 of file test000066.cpp.

References CCopasiParameter::DOUBLE, CModelEntity::FIXED, CCopasiDataModel::getModel(), CCopasiDataModel::importSBMLFromString(), CModel::ml, CModel::mMol, MODEL_STRING1, pCOPASIDATAMODEL, CEvaluationTree::PreDefined, and CModel::s.

58 {
59  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
60  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING1));
61  CModel* pModel = pDataModel->getModel();
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);
69  CPPUNIT_ASSERT(pCompartment->getStatus() == CModelEntity::FIXED);
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);
79  // check for the local parameter
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);
84  CPPUNIT_ASSERT(pParameter->getType() == CCopasiParameter::DOUBLE);
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);
89  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::PreDefined);
90  CPPUNIT_ASSERT(pFunction->getObjectName() == "Constant flux (irreversible)");
91 }
static const char * MODEL_STRING1
Definition: test000066.h:40
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000066.h:48
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
Definition: CModel.h:50
void test000066::test_import_reaction_with_constant_flux_function ( )

Definition at line 93 of file test000066.cpp.

References CCopasiParameter::DOUBLE, CModelEntity::FIXED, CCopasiDataModel::getModel(), CCopasiDataModel::importSBMLFromString(), CModel::ml, CModel::mMol, MODEL_STRING2, pCOPASIDATAMODEL, CEvaluationTree::PreDefined, and CModel::s.

94 {
95  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
96  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING2));
97  CModel* pModel = pDataModel->getModel();
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);
105  CPPUNIT_ASSERT(pCompartment->getStatus() == CModelEntity::FIXED);
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);
115  // check for the local parameter
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);
120  CPPUNIT_ASSERT(pParameter->getType() == CCopasiParameter::DOUBLE);
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);
125  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::PreDefined);
126  CPPUNIT_ASSERT(pFunction->getObjectName() == "Constant flux (irreversible)");
127 }
static const char * MODEL_STRING2
Definition: test000066.h:41
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000066.h:48
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
Definition: CModel.h:50
void test000066::test_import_reaction_with_constant_flux_function_global_parameter ( )

Definition at line 275 of file test000066.cpp.

References CModelEntity::FIXED, CCopasiDataModel::getModel(), CCopasiDataModel::importSBMLFromString(), CModel::ml, CModel::mMol, MODEL_STRING4, pCOPASIDATAMODEL, CEvaluationTree::PreDefined, and CModel::s.

276 {
277  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
278  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING4));
279  CModel* pModel = pDataModel->getModel();
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);
287  CPPUNIT_ASSERT(pCompartment->getStatus() == CModelEntity::FIXED);
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);
297  // check for the global parameter
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);
302  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::PreDefined);
303  CPPUNIT_ASSERT(pFunction->getObjectName() == "Constant flux (irreversible)");
304 }
static const char * MODEL_STRING4
Definition: test000066.h:43
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000066.h:48
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
Definition: CModel.h:50
void test000066::test_import_reaction_with_constant_flux_global_parameter ( )

Definition at line 244 of file test000066.cpp.

References CModelEntity::FIXED, CCopasiDataModel::getModel(), CCopasiDataModel::importSBMLFromString(), CModel::ml, CModel::mMol, MODEL_STRING3, pCOPASIDATAMODEL, CEvaluationTree::PreDefined, and CModel::s.

245 {
246  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
247  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING3));
248  CModel* pModel = pDataModel->getModel();
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);
256  CPPUNIT_ASSERT(pCompartment->getStatus() == CModelEntity::FIXED);
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);
266  // check for the global parameter
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);
271  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::PreDefined);
272  CPPUNIT_ASSERT(pFunction->getObjectName() == "Constant flux (irreversible)");
273 }
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000066.h:48
static const char * MODEL_STRING3
Definition: test000066.h:42
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
Definition: CModel.h:50
void test000066::test_import_reaction_with_constant_flux_reversible ( )

Definition at line 421 of file test000066.cpp.

References CCopasiParameter::DOUBLE, CModelEntity::FIXED, CCopasiDataModel::getModel(), CCopasiDataModel::importSBMLFromString(), CModel::ml, CModel::mMol, MODEL_STRING5, pCOPASIDATAMODEL, CEvaluationTree::PreDefined, and CModel::s.

422 {
423  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
424  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING5));
425  CModel* pModel = pDataModel->getModel();
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);
433  CPPUNIT_ASSERT(pCompartment->getStatus() == CModelEntity::FIXED);
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);
443  // check for the local parameter
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);
448  CPPUNIT_ASSERT(pParameter->getType() == CCopasiParameter::DOUBLE);
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);
453  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::PreDefined);
454  CPPUNIT_ASSERT(pFunction->getObjectName() == "Constant flux (reversible)");
455 }
static const char * MODEL_STRING5
Definition: test000066.h:44
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000066.h:48
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
Definition: CModel.h:50
void test000066::test_import_reaction_with_constant_flux_reversible_function ( )

Definition at line 457 of file test000066.cpp.

References CCopasiParameter::DOUBLE, CModelEntity::FIXED, CCopasiDataModel::getModel(), CCopasiDataModel::importSBMLFromString(), CModel::ml, CModel::mMol, MODEL_STRING6, pCOPASIDATAMODEL, CEvaluationTree::PreDefined, and CModel::s.

458 {
459  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
460  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING6));
461  CModel* pModel = pDataModel->getModel();
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);
469  CPPUNIT_ASSERT(pCompartment->getStatus() == CModelEntity::FIXED);
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);
479  // check for the local parameter
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);
484  CPPUNIT_ASSERT(pParameter->getType() == CCopasiParameter::DOUBLE);
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);
489  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::PreDefined);
490  CPPUNIT_ASSERT(pFunction->getObjectName() == "Constant flux (reversible)");
491 }
static const char * MODEL_STRING6
Definition: test000066.h:45
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000066.h:48
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
Definition: CModel.h:50
void test000066::test_import_reaction_with_constant_flux_reversible_function_global_parameter ( )

Definition at line 647 of file test000066.cpp.

References CModelEntity::FIXED, CCopasiDataModel::getModel(), CCopasiDataModel::importSBMLFromString(), CModel::ml, CModel::mMol, MODEL_STRING8, pCOPASIDATAMODEL, CEvaluationTree::PreDefined, and CModel::s.

648 {
649  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
650  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING8));
651  CModel* pModel = pDataModel->getModel();
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);
659  CPPUNIT_ASSERT(pCompartment->getStatus() == CModelEntity::FIXED);
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);
669  // check for the global parameter
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);
674  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::PreDefined);
675  CPPUNIT_ASSERT(pFunction->getObjectName() == "Constant flux (reversible)");
676 }
static const char * MODEL_STRING8
Definition: test000066.h:47
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000066.h:48
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
Definition: CModel.h:50
void test000066::test_import_reaction_with_constant_flux_reversible_global_parameter ( )

Definition at line 616 of file test000066.cpp.

References CModelEntity::FIXED, CCopasiDataModel::getModel(), CCopasiDataModel::importSBMLFromString(), CModel::ml, CModel::mMol, MODEL_STRING7, pCOPASIDATAMODEL, CEvaluationTree::PreDefined, and CModel::s.

617 {
618  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
619  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING7));
620  CModel* pModel = pDataModel->getModel();
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);
628  CPPUNIT_ASSERT(pCompartment->getStatus() == CModelEntity::FIXED);
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);
638  // check for the global parameter
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);
643  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::PreDefined);
644  CPPUNIT_ASSERT(pFunction->getObjectName() == "Constant flux (reversible)");
645 }
static const char * MODEL_STRING7
Definition: test000066.h:46
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000066.h:48
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
Definition: CModel.h:50

Member Data Documentation

const char * test000066::MODEL_STRING1
staticprotected

Definition at line 40 of file test000066.h.

Referenced by test_import_reaction_with_constant_flux().

const char * test000066::MODEL_STRING2
staticprotected

Definition at line 41 of file test000066.h.

Referenced by test_import_reaction_with_constant_flux_function().

const char * test000066::MODEL_STRING3
staticprotected
const char * test000066::MODEL_STRING4
staticprotected
const char * test000066::MODEL_STRING5
staticprotected

Definition at line 44 of file test000066.h.

Referenced by test_import_reaction_with_constant_flux_reversible().

const char * test000066::MODEL_STRING6
staticprotected
const char * test000066::MODEL_STRING7
staticprotected
const char * test000066::MODEL_STRING8
staticprotected
CCopasiDataModel * test000066::pCOPASIDATAMODEL = NULL
staticprotected

The documentation for this class was generated from the following files: