86 CPPUNIT_ASSERT(pNotes != NULL);
87 CPPUNIT_ASSERT(pNotes->getName() ==
"body");
88 CPPUNIT_ASSERT(pNotes->getURI() ==
"http://www.w3.org/1999/xhtml");
89 CPPUNIT_ASSERT(pNotes->hasNamespaceURI(
"http://www.w3.org/1999/xhtml") ==
true);
90 CPPUNIT_ASSERT(pNotes->getNumChildren() == 3);
91 XMLNode* pChild = &pNotes->getChild(0);
92 CPPUNIT_ASSERT(pChild != NULL);
93 CPPUNIT_ASSERT(pChild->isElement());
94 CPPUNIT_ASSERT(pChild->getName() ==
"p");
95 CPPUNIT_ASSERT(pChild->getNumChildren() == 1);
96 pChild = &pChild->getChild(0);
97 CPPUNIT_ASSERT(pChild != NULL);
98 CPPUNIT_ASSERT(pChild->isText());
99 CPPUNIT_ASSERT(pChild->getCharacters().find(
"This") != std::string::npos);
100 pChild = &pNotes->getChild(1);
101 CPPUNIT_ASSERT(pChild != NULL);
102 CPPUNIT_ASSERT(pChild->isElement());
103 CPPUNIT_ASSERT(pChild->getName() ==
"p");
104 CPPUNIT_ASSERT(pChild->getNumChildren() == 1);
105 pChild = &pChild->getChild(0);
106 CPPUNIT_ASSERT(pChild != NULL);
107 CPPUNIT_ASSERT(pChild->isText());
108 CPPUNIT_ASSERT(pChild->getCharacters().find(
"several") != std::string::npos);
109 pChild = &pNotes->getChild(2);
110 CPPUNIT_ASSERT(pChild != NULL);
111 CPPUNIT_ASSERT(pChild->isElement());
112 CPPUNIT_ASSERT(pChild->getName() ==
"p");
113 CPPUNIT_ASSERT(pChild->getNumChildren() == 1);
114 pChild = &pChild->getChild(0);
115 CPPUNIT_ASSERT(pChild != NULL);
116 CPPUNIT_ASSERT(pChild->isText());
117 CPPUNIT_ASSERT(pChild->getCharacters().find(
"correctly") != std::string::npos);
119 SBMLDocument *pDocument =
new SBMLDocument(2, 4);
120 CPPUNIT_ASSERT(pDocument != NULL);
121 Model* pModel = pDocument->createModel(
"test_model");
122 CPPUNIT_ASSERT(pModel != NULL);
123 int set_result = pModel->setNotes(pNotes);
124 CPPUNIT_ASSERT(set_result == LIBSBML_OPERATION_SUCCESS);
static const char * NOTES_STRING_3