57 CPPUNIT_ASSERT(pDataModel->
getModel() != NULL);
60 CPPUNIT_ASSERT(pDocument != NULL);
61 Model* pModel = pDocument->getModel();
62 CPPUNIT_ASSERT(pModel != NULL);
65 CPPUNIT_ASSERT(pModel->getNumCompartments() == 1);
66 Compartment* pCompartment = pModel->getCompartment(0);
67 CPPUNIT_ASSERT(pCompartment->getConstant() ==
false);
70 CPPUNIT_ASSERT(pModel->getNumSpecies() == 2);
71 const Species* pA = pModel->getSpecies(0);
72 CPPUNIT_ASSERT(pA != NULL);
73 CPPUNIT_ASSERT(pA->getHasOnlySubstanceUnits() ==
true);
74 const Species* pB = pModel->getSpecies(0);
75 CPPUNIT_ASSERT(pB != NULL);
76 CPPUNIT_ASSERT(pB->getHasOnlySubstanceUnits() ==
true);
78 CPPUNIT_ASSERT(pModel->getNumInitialAssignments() == 1);
80 const InitialAssignment* pIA = pModel->getInitialAssignment(0);
81 CPPUNIT_ASSERT(pIA != NULL);
82 CPPUNIT_ASSERT(pIA->getSymbol() == pCompartment->getId());
83 CPPUNIT_ASSERT(pIA->isSetMath() ==
true);
84 const ASTNode* pNode = pIA->getMath();
85 CPPUNIT_ASSERT(pNode != NULL);
88 CPPUNIT_ASSERT(pNode->getType() == AST_NAME);
89 CPPUNIT_ASSERT(pNode->getName() == pA->getId());
90 CPPUNIT_ASSERT(pModel->getNumRules() == 1);
92 const Rule* pRule = pModel->getRule(0);
93 CPPUNIT_ASSERT(pRule != NULL);
94 const RateRule* pRateRule =
dynamic_cast<const RateRule*
>(pRule);
95 CPPUNIT_ASSERT(pRateRule != NULL);
96 CPPUNIT_ASSERT(pRateRule->getVariable() == pCompartment->getId());
97 CPPUNIT_ASSERT(pRule->isSetMath() ==
true);
98 pNode = pRateRule->getMath();
99 CPPUNIT_ASSERT(pNode != NULL);
100 CPPUNIT_ASSERT(pNode->getType() == AST_NAME);
101 CPPUNIT_ASSERT(pNode->getName() == pA->getId());
SBMLDocument * getCurrentSBMLDocument()
std::string exportSBMLToString(CProcessReport *pExportHandler, int sbmlLevel, int sbmlVersion)
bool load_cps_model_from_stream(std::istream &is, CCopasiDataModel &dataModel)
static CCopasiDataModel * pCOPASIDATAMODEL
static const char * MODEL_STRING