54 CPPUNIT_ASSERT(pModel != NULL);
56 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
57 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
58 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
59 const CCompartment* pCompartment = pModel->getCompartments()[0];
60 CPPUNIT_ASSERT(pCompartment != NULL);
62 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 2);
63 CMetab* pA = pModel->getMetabolites()[0];
64 CPPUNIT_ASSERT(pA != NULL);
66 const CMetab* pB = pModel->getMetabolites()[1];
67 CPPUNIT_ASSERT(pB != NULL);
69 CPPUNIT_ASSERT(pModel->getModelValues().size() == 1);
70 const CModelValue* pModelValue = pModel->getModelValues()[0];
71 CPPUNIT_ASSERT(pModelValue != NULL);
73 CPPUNIT_ASSERT(pModelValue->getInitialExpression() !=
"");
74 const CExpression* pExpr = pModelValue->getInitialExpressionPtr();
75 CPPUNIT_ASSERT(pExpr != NULL);
78 CPPUNIT_ASSERT(pNode != NULL);
80 CPPUNIT_ASSERT(pObjectNode != NULL);
82 CPPUNIT_ASSERT(!objectCN.empty());
83 std::vector<CCopasiContainer*> listOfContainers;
84 listOfContainers.push_back(pModel);
86 CPPUNIT_ASSERT(pObject != NULL);
88 CPPUNIT_ASSERT(pObject->
getObjectName() == std::string(
"InitialParticleNumber"));
91 CPPUNIT_ASSERT(pModel->getReactions().size() == 2);
92 const CReaction* pReaction1 = pModel->getReactions()[0];
93 CPPUNIT_ASSERT(pReaction1 != NULL);
94 CPPUNIT_ASSERT(pReaction1->isReversible() ==
false);
96 const CFunction* pKineticFunction = pReaction1->getFunction();
97 CPPUNIT_ASSERT(pKineticFunction != NULL);
101 CPPUNIT_ASSERT(pMassAction == NULL);
102 const CChemEq* pChemEq = &pReaction1->getChemEq();
103 CPPUNIT_ASSERT(pChemEq != NULL);
107 CPPUNIT_ASSERT(pElement != NULL);
108 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
109 CPPUNIT_ASSERT(pElement->getMetabolite() == pA);
113 const CReaction* pReaction2 = pModel->getReactions()[1];
114 CPPUNIT_ASSERT(pReaction2 != NULL);
115 CPPUNIT_ASSERT(pReaction2->isReversible() ==
false);
117 pKineticFunction = pReaction2->getFunction();
118 CPPUNIT_ASSERT(pKineticFunction != NULL);
119 CPPUNIT_ASSERT(pKineticFunction->getObjectName() == std::string(
"Henri-Michaelis-Menten (irreversible)"));
121 pChemEq = &pReaction2->getChemEq();
122 CPPUNIT_ASSERT(pChemEq != NULL);
123 CPPUNIT_ASSERT(pChemEq->getCompartmentNumber() == 1);
124 CPPUNIT_ASSERT(pChemEq->getSubstrates().size() == 1);
125 pElement = pChemEq->getSubstrates()[0];
126 CPPUNIT_ASSERT(pElement != NULL);
127 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
128 CPPUNIT_ASSERT(pElement->getMetabolite() == pA);
129 CPPUNIT_ASSERT(pChemEq->getProducts().size() == 1);
130 pElement = pChemEq->getProducts()[0];
131 CPPUNIT_ASSERT(pElement != NULL);
132 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
133 CPPUNIT_ASSERT(pElement->getMetabolite() == pB);
134 CPPUNIT_ASSERT(pChemEq->getModifiers().size() == 0);
135 const std::vector<std::vector<std::string> > parameterMappings = pReaction2->getParameterMappings();
136 CPPUNIT_ASSERT(parameterMappings.size() == 3);
137 CPPUNIT_ASSERT(parameterMappings[0].size() == 1);
138 const std::string parameterKey = parameterMappings[0][0];
139 CPPUNIT_ASSERT(parameterKey == pA->getKey());
size_t getCompartmentNumber() const
const std::string & getObjectName() const
virtual size_t size() const
const CRegisteredObjectName & getObjectCN() const
static const char * MODEL_STRING
const CCopasiVector< CChemEqElement > & getProducts() const
const CCopasiVector< CChemEqElement > & getSubstrates() const
const CCopasiVector< CChemEqElement > & getModifiers() const
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
CCopasiObject * ObjectFromName(const std::vector< CCopasiContainer * > &listOfContainer, const CCopasiObjectName &CN) const
CCopasiContainer * getObjectParent() const
static CCopasiDataModel * pCOPASIDATAMODEL