109 CPPUNIT_ASSERT(
false);
112 CPPUNIT_ASSERT(!s.empty());
114 SBMLDocument* pSBMLDocument = NULL;
118 pSBMLDocument = reader.readSBMLFromString(s);
122 CPPUNIT_ASSERT(
false);
125 CPPUNIT_ASSERT(pSBMLDocument != NULL);
126 Model* pModel = pSBMLDocument->getModel();
127 CPPUNIT_ASSERT(pModel != NULL);
128 CPPUNIT_ASSERT(pModel->isSetNotes() ==
true);
129 std::string notes = pModel->getNotesString();
130 CPPUNIT_ASSERT(!notes.empty());
131 CPPUNIT_ASSERT(notes.find(
"Simple note on model") != std::string::npos);
133 CPPUNIT_ASSERT(pModel->getNumCompartments() == 1);
134 CPPUNIT_ASSERT(pModel->getNumSpecies() == 1);
135 CPPUNIT_ASSERT(pModel->getNumParameters() == 1);
136 CPPUNIT_ASSERT(pModel->getNumReactions() == 1);
137 CPPUNIT_ASSERT(pModel->getNumEvents() == 1);
139 SBase* pObject = pModel->getCompartment(0);
140 CPPUNIT_ASSERT(pObject != NULL);
141 CPPUNIT_ASSERT(pObject->isSetNotes() ==
true);
142 notes = pObject->getNotesString();
143 CPPUNIT_ASSERT(!notes.empty());
144 CPPUNIT_ASSERT(notes.find(
"Simple note on compartment") != std::string::npos);
146 pObject = pModel->getSpecies(0);
147 CPPUNIT_ASSERT(pObject != NULL);
148 CPPUNIT_ASSERT(pObject->isSetNotes() ==
true);
149 notes = pObject->getNotesString();
150 CPPUNIT_ASSERT(!notes.empty());
151 CPPUNIT_ASSERT(notes.find(
"Simple note on species") != std::string::npos);
153 pObject = pModel->getParameter(0);
154 CPPUNIT_ASSERT(pObject != NULL);
155 CPPUNIT_ASSERT(pObject->isSetNotes() ==
true);
156 notes = pObject->getNotesString();
157 CPPUNIT_ASSERT(!notes.empty());
158 CPPUNIT_ASSERT(notes.find(
"Simple note on parameter") != std::string::npos);
160 pObject = pModel->getReaction(0);
161 CPPUNIT_ASSERT(pObject != NULL);
162 CPPUNIT_ASSERT(pObject->isSetNotes() ==
true);
163 notes = pObject->getNotesString();
164 CPPUNIT_ASSERT(!notes.empty());
165 CPPUNIT_ASSERT(notes.find(
"Simple note on reaction") != std::string::npos);
167 pObject = pModel->getEvent(0);
168 CPPUNIT_ASSERT(pObject != NULL);
169 CPPUNIT_ASSERT(pObject->isSetNotes() ==
true);
170 notes = pObject->getNotesString();
171 CPPUNIT_ASSERT(!notes.empty());
172 CPPUNIT_ASSERT(notes.find(
"Simple note on event") != std::string::npos);
std::string exportSBMLToString(CProcessReport *pExportHandler, int sbmlLevel, int sbmlVersion)
static const char * CPS_MODEL_1
bool load_cps_model_from_stream(std::istream &is, CCopasiDataModel &dataModel)
CCopasiDataModel * pDataModel