46 CPPUNIT_ASSERT(pModel != NULL);
47 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
48 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
49 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
50 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
51 const CCompartment* pCompartment = pModel->getCompartments()[0];
52 CPPUNIT_ASSERT(pCompartment != NULL);
54 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 2);
55 CMetab* pA = pModel->getMetabolites()[0];
56 CPPUNIT_ASSERT(pA != NULL);
58 const CMetab* pB = pModel->getMetabolites()[1];
59 CPPUNIT_ASSERT(pB != NULL);
61 CPPUNIT_ASSERT(pModel->getModelValues().size() == 1);
62 const CModelValue* pModelValue = pModel->getModelValues()[0];
63 CPPUNIT_ASSERT(pModelValue != NULL);
65 CPPUNIT_ASSERT(fabs((pModelValue->getInitialValue() - 3.7) / 3.7) < 1e-3);
67 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
68 const CReaction* pReaction1 = pModel->getReactions()[0];
69 CPPUNIT_ASSERT(pReaction1 != NULL);
70 CPPUNIT_ASSERT(pReaction1->isReversible() ==
true);
72 const CFunction* pKineticFunction = pReaction1->getFunction();
73 CPPUNIT_ASSERT(pKineticFunction != NULL);
75 CPPUNIT_ASSERT(pMassAction != NULL);
76 const CChemEq* pChemEq = &pReaction1->getChemEq();
77 CPPUNIT_ASSERT(pChemEq != NULL);
81 CPPUNIT_ASSERT(pElement != NULL);
82 CPPUNIT_ASSERT(fabs((pElement->getMultiplicity() - 1.85) / 1.85) < 1e-3);
83 CPPUNIT_ASSERT(pElement->getMetabolite() == pA);
86 CPPUNIT_ASSERT(pElement != NULL);
87 CPPUNIT_ASSERT(fabs((pElement->getMultiplicity() - 3.35) / 3.35) / 3.35 < 1e-3);
88 CPPUNIT_ASSERT(pElement->getMetabolite() == pB);
93 std::string s = message.getText();
94 CPPUNIT_ASSERT(!s.empty());
95 CPPUNIT_ASSERT(s.find(std::string(
"One or more stoichiometric expressions were evaluated and converted to constants values.")) != std::string::npos);
size_t getCompartmentNumber() const
virtual size_t size() const
static const char * MODEL_STRING
const CCopasiVector< CChemEqElement > & getProducts() const
const CCopasiVector< CChemEqElement > & getSubstrates() const
const CCopasiVector< CChemEqElement > & getModifiers() const
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
static CCopasiDataModel * pCOPASIDATAMODEL