14 #include "utilities.hpp"
16 #include <sbml/SBMLDocument.h>
17 #include <sbml/Model.h>
18 #include <sbml/Rule.h>
19 #include <sbml/Species.h>
20 #include <sbml/FunctionDefinition.h>
21 #include <sbml/Parameter.h>
22 #include <sbml/math/ASTNode.h>
51 CPPUNIT_ASSERT(pDataModel->
getModel() != NULL);
54 CPPUNIT_ASSERT(sbml.empty() ==
false);
56 CPPUNIT_ASSERT(doc != NULL);
57 CPPUNIT_ASSERT(doc->getModel() != NULL);
58 CPPUNIT_ASSERT(doc->getModel()->getNumFunctionDefinitions() > 0);
60 SBase* def = doc->getModel()->getFunctionDefinition(0);
61 CPPUNIT_ASSERT(def != NULL);
63 FunctionDefinition* fDef =
dynamic_cast<FunctionDefinition*
>(def);
64 CPPUNIT_ASSERT(def != NULL);
65 CPPUNIT_ASSERT(def->isSetAnnotation() ==
true);
66 CPPUNIT_ASSERT(def->getAnnotation() != NULL);
67 CPPUNIT_ASSERT(def->getAnnotation()->getNumChildren() == 1);
68 CPPUNIT_ASSERT(def->getAnnotation()->getChild(0).getURI() ==
"http://sbml.org/annotations/distribution");
69 CPPUNIT_ASSERT(def->getAnnotation()->getChild(0).getAttrValue(
"definition") ==
"http://www.uncertml.org/distributions/normal");
73 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
74 "<!-- generated with COPASI 4.3.25 (Debug) (http://www.copasi.org) at 2008-02-27 12:47:16 UTC -->\n"
75 "<COPASI xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.copasi.org/static/schema.xsd\" versionMajor=\"1\" versionMinor=\"0\" versionDevel=\"25\">\n"
76 " <Model key=\"Model_0\" name=\"New Model\" timeUnit=\"s\" volumeUnit=\"ml\" quantityUnit=\"mmol\" type=\"deterministic\">\n"
78 " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
82 " <ListOfModelValues>\n"
83 " <ModelValue key=\"ModelValue_0\" name=\"K\" simulationType=\"fixed\">\n"
84 " <InitialExpression>\n"
86 " </InitialExpression>\n"
88 " </ListOfModelValues>\n"
90 " <StateTemplateVariable objectReference=\"Model_0\"/>\n"
91 " <StateTemplateVariable objectReference=\"ModelValue_0\"/>\n"
93 " <InitialState type=\"initialState\">\n"
94 " 0 4.12243135037551\n"
SBMLDocument * getCurrentSBMLDocument()
static CCopasiDataModel * pCOPASIDATAMODEL
std::string exportSBMLToString(CProcessReport *pExportHandler, int sbmlLevel, int sbmlVersion)
bool load_cps_model_from_stream(std::istream &is, CCopasiDataModel &dataModel)
static CCopasiDataModel * addDatamodel()
static void init(int argc, char *argv[], const bool &withGui=false)
static const char * MODEL_STRING