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);
66 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
67 const CReaction* pReaction1 = pModel->getReactions()[0];
68 CPPUNIT_ASSERT(pReaction1 != NULL);
69 CPPUNIT_ASSERT(pReaction1->isReversible() ==
true);
71 const CFunction* pKineticFunction = pReaction1->getFunction();
72 CPPUNIT_ASSERT(pKineticFunction != NULL);
74 CPPUNIT_ASSERT(pMassAction != NULL);
75 const CChemEq* pChemEq = &pReaction1->getChemEq();
76 CPPUNIT_ASSERT(pChemEq != NULL);
80 CPPUNIT_ASSERT(pElement != NULL);
81 CPPUNIT_ASSERT(fabs((pElement->getMultiplicity() - 2.0) / 2.0) < 1e-3);
82 CPPUNIT_ASSERT(pElement->getMetabolite() == pA);
85 CPPUNIT_ASSERT(pElement != NULL);
86 CPPUNIT_ASSERT(fabs((pElement->getMultiplicity() - 3.0) / 3.0) < 1e-3);
87 CPPUNIT_ASSERT(pElement->getMetabolite() == pB);
92 std::string s = message.getText();
93 CPPUNIT_ASSERT(!s.empty());
94 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
static const char * MODEL_STRING
virtual size_t size() const
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