14 #include "utilities.hpp"
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 const CMetab* pB = pModel->getMetabolites()[1];
56 CPPUNIT_ASSERT(pB != NULL);
58 CMetab* pA = pModel->getMetabolites()[0];
59 CPPUNIT_ASSERT(pA != NULL);
62 CPPUNIT_ASSERT(pExpr != NULL);
64 CPPUNIT_ASSERT(pNode != NULL);
66 CPPUNIT_ASSERT(pDelayNode != NULL);
68 CPPUNIT_ASSERT(pObjectNode != NULL);
70 CPPUNIT_ASSERT(!objectCN.empty());
71 std::vector<CCopasiContainer*> listOfContainers;
72 listOfContainers.push_back(pModel);
74 CPPUNIT_ASSERT(pObject != NULL);
76 CPPUNIT_ASSERT(pObject->
getObjectName() == std::string(
"Concentration"));
79 CPPUNIT_ASSERT(pNumberNode != NULL);
81 CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 0.5) / 0.5) < 1e-3);
83 CPPUNIT_ASSERT(pNumberNode->getSibling() == NULL);
85 CPPUNIT_ASSERT(pModel->getModelValues().size() == 1);
86 const CModelValue* pModelValue = pModel->getModelValues()[0];
87 CPPUNIT_ASSERT(pModelValue != NULL);
89 CPPUNIT_ASSERT(pModel->getReactions().size() == 0);
93 std::string s = message.getText();
94 CPPUNIT_ASSERT(!s.empty());
95 CPPUNIT_ASSERT(s.find(std::string(
"COPASI does not support time delays. Calculations on this model will most likely lead to unusable results.")) != std::string::npos);
101 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
102 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">\n"
103 " <model id=\"Model_1\" name=\"New Model\">\n"
105 " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
106 " <p>Model with fixed compartment volume, two species with hasOnlySubstanceUnits flag set to false. The units are set to ml and mMol.</p>\n"
109 " <listOfUnitDefinitions>\n"
110 " <unitDefinition id=\"volume\">\n"
112 " <unit kind=\"litre\" scale=\"-3\"/>\n"
114 " </unitDefinition>\n"
115 " <unitDefinition id=\"substance\">\n"
117 " <unit kind=\"mole\" scale=\"-3\"/>\n"
119 " </unitDefinition>\n"
120 " </listOfUnitDefinitions>\n"
121 " <listOfCompartments>\n"
122 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>\n"
123 " </listOfCompartments>\n"
125 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\" constant=\"false\" />\n"
126 " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"1\" constant=\"true\" />\n"
127 " </listOfSpecies>\n"
128 " <listOfParameters>\n"
129 " <parameter id=\"parameter_1\" name=\"K\" value=\"0\"/>\n"
130 " </listOfParameters>\n"
132 " <assignmentRule variable=\"species_1\">\n"
133 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
135 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
138 " <ci> species_2 </ci>\n"
142 " </assignmentRule>\n"
Header file of class CExpression.
Header file of class CModelEntity and CModelValue.
CCopasiNode< Data > * getSibling()
const std::string & getObjectName() const
const CRegisteredObjectName & getObjectCN() const
static CCopasiDataModel * pCOPASIDATAMODEL
static const char * MODEL_STRING
static CCopasiDataModel * addDatamodel()
static Type subType(const Type &type)
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
static void init(int argc, char *argv[], const bool &withGui=false)
CCopasiNode< Data > * getChild()
CCopasiObject * ObjectFromName(const std::vector< CCopasiContainer * > &listOfContainer, const CCopasiObjectName &CN) const
CCopasiContainer * getObjectParent() const