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() == 2);
71 const CModelValue* pFactor = pModel->getModelValues()[1];
72 CPPUNIT_ASSERT(pFactor != NULL);
74 CPPUNIT_ASSERT(fabs((pFactor->getInitialValue() - pModel->getQuantity2NumberFactor()) / pModel->getQuantity2NumberFactor()) < 1e-3);
75 const CModelValue* pModelValue = pModel->getModelValues()[0];
76 CPPUNIT_ASSERT(pModelValue != NULL);
81 CPPUNIT_ASSERT(pNode != NULL);
83 CPPUNIT_ASSERT(pOperatorNode != NULL);
86 CPPUNIT_ASSERT(pObjectNode != NULL);
88 CPPUNIT_ASSERT(!objectCN.empty());
89 std::vector<CCopasiContainer*> listOfContainers;
90 listOfContainers.push_back(pModel);
92 CPPUNIT_ASSERT(pObject != NULL);
94 CPPUNIT_ASSERT(pObject->
getObjectName() == std::string(
"ParticleNumber"));
97 CPPUNIT_ASSERT(pObjectNode != NULL);
98 objectCN = pObjectNode->getObjectCN();
99 CPPUNIT_ASSERT(!objectCN.empty());
101 CPPUNIT_ASSERT(pObject != NULL);
102 CPPUNIT_ASSERT(pObject->isReference() ==
true);
103 CPPUNIT_ASSERT(pObject->getObjectName() == std::string(
"Value"));
104 CPPUNIT_ASSERT(pObject->getObjectParent() == pFactor);
106 CPPUNIT_ASSERT(pModel->getReactions().size() == 2);
107 const CReaction* pReaction1 = pModel->getReactions()[0];
108 CPPUNIT_ASSERT(pReaction1 != NULL);
109 CPPUNIT_ASSERT(pReaction1->isReversible() ==
false);
111 const CFunction* pKineticFunction = pReaction1->getFunction();
112 CPPUNIT_ASSERT(pKineticFunction != NULL);
116 CPPUNIT_ASSERT(pMassAction == NULL);
117 const CChemEq* pChemEq = &pReaction1->getChemEq();
118 CPPUNIT_ASSERT(pChemEq != NULL);
122 CPPUNIT_ASSERT(pElement != NULL);
123 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
124 CPPUNIT_ASSERT(pElement->getMetabolite() == pA);
128 const CReaction* pReaction2 = pModel->getReactions()[1];
129 CPPUNIT_ASSERT(pReaction2 != NULL);
130 CPPUNIT_ASSERT(pReaction2->isReversible() ==
false);
132 pKineticFunction = pReaction2->getFunction();
133 CPPUNIT_ASSERT(pKineticFunction != NULL);
134 CPPUNIT_ASSERT(pKineticFunction->getObjectName() == std::string(
"Henri-Michaelis-Menten (irreversible)"));
136 pChemEq = &pReaction2->getChemEq();
137 CPPUNIT_ASSERT(pChemEq != NULL);
138 CPPUNIT_ASSERT(pChemEq->getCompartmentNumber() == 1);
139 CPPUNIT_ASSERT(pChemEq->getSubstrates().size() == 1);
140 pElement = pChemEq->getSubstrates()[0];
141 CPPUNIT_ASSERT(pElement != NULL);
142 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
143 CPPUNIT_ASSERT(pElement->getMetabolite() == pA);
144 CPPUNIT_ASSERT(pChemEq->getProducts().size() == 1);
145 pElement = pChemEq->getProducts()[0];
146 CPPUNIT_ASSERT(pElement != NULL);
147 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
148 CPPUNIT_ASSERT(pElement->getMetabolite() == pB);
149 CPPUNIT_ASSERT(pChemEq->getModifiers().size() == 0);
150 const std::vector<std::vector<std::string> > parameterMappings = pReaction2->getParameterMappings();
151 CPPUNIT_ASSERT(parameterMappings.size() == 3);
152 CPPUNIT_ASSERT(parameterMappings[0].size() == 1);
153 const std::string parameterKey = parameterMappings[0][0];
154 CPPUNIT_ASSERT(parameterKey == pA->getKey());
const CExpression * getExpressionPtr() const
size_t getCompartmentNumber() const
const std::string & getObjectName() const
virtual size_t size() const
static CCopasiDataModel * pCOPASIDATAMODEL
const Type & getType() const
const CCopasiVector< CChemEqElement > & getProducts() const
static const char * MODEL_STRING
const CCopasiVector< CChemEqElement > & getSubstrates() const
static Type subType(const Type &type)
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.
const CModelEntity::Status & getStatus() const
CCopasiNode< Data > * getChild()
CCopasiObject * ObjectFromName(const std::vector< CCopasiContainer * > &listOfContainer, const CCopasiObjectName &CN) const
CCopasiContainer * getObjectParent() const