COPASI API  4.16.103
Public Member Functions | Static Protected Attributes | Private Member Functions | List of all members
test000073 Class Reference

#include <test000073.h>

Inheritance diagram for test000073:
Inheritance graph
[legend]
Collaboration diagram for test000073:
Collaboration graph
[legend]

Public Member Functions

void setUp ()
 
void tearDown ()
 
void test_bug1087 ()
 

Static Protected Attributes

static const char * MODEL_STRING1
 
static CCopasiDataModelpCOPASIDATAMODEL = NULL
 

Private Member Functions

 CPPUNIT_TEST (test_bug1087)
 
 CPPUNIT_TEST_SUITE (test000073)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 26 of file test000073.h.

Member Function Documentation

test000073::CPPUNIT_TEST ( test_bug1087  )
private
test000073::CPPUNIT_TEST_SUITE ( test000073  )
private
test000073::CPPUNIT_TEST_SUITE_END ( )
private
void test000073::setUp ( )

Definition at line 39 of file test000073.cpp.

References CCopasiRootContainer::addDatamodel(), CCopasiRootContainer::init(), and pCOPASIDATAMODEL.

40 {
41  // Create the root container.
42  CCopasiRootContainer::init(0, NULL, false);
43  // Create the global data model.
45 }
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000073.h:34
static CCopasiDataModel * addDatamodel()
static void init(int argc, char *argv[], const bool &withGui=false)
void test000073::tearDown ( )

Definition at line 47 of file test000073.cpp.

References CCopasiRootContainer::destroy().

void test000073::test_bug1087 ( )

Definition at line 52 of file test000073.cpp.

References CModelEntity::ASSIGNMENT, CCopasiDataModel::getModel(), CModel::getModelValues(), CCopasiDataModel::importSBMLFromString(), MODEL_STRING1, pCOPASIDATAMODEL, and CCopasiVector< T >::size().

53 {
54  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
55  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING1));
56  CPPUNIT_ASSERT(pDataModel->getModel() != NULL);
57  CPPUNIT_ASSERT(pDataModel->getModel()->getModelValues().size() == 1);
58  const CModelValue* pModelValue = pDataModel->getModel()->getModelValues()[0];
59  CPPUNIT_ASSERT(pModelValue != NULL);
60  CPPUNIT_ASSERT(pModelValue->getSBMLId() == "parameter_1");
61  CPPUNIT_ASSERT(pModelValue->getStatus() == CModelEntity::ASSIGNMENT);
62  std::string formula = pModelValue->getExpression();
63  CPPUNIT_ASSERT(formula == "3.1*4.5");
64 }
const CCopasiVectorN< CModelValue > & getModelValues() const
Definition: CModel.cpp:1060
virtual size_t size() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000073.h:34
static const char * MODEL_STRING1
Definition: test000073.h:33
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)

Member Data Documentation

const char * test000073::MODEL_STRING1
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<sbml xmlns=\"http://www.sbml.org/sbml/level1\" level=\"1\" version=\"2\">\n"
" <model name=\"Model_1\" >\n"
" <notes>\n"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
" <p>Level 1 model with rule on global parameter.</p>\n"
" </body>\n"
" </notes>\n"
" <listOfParameters>\n"
" <parameter name=\"parameter_1\" value=\"1.1\" />\n"
" </listOfParameters>\n"
" <listOfRules>\n"
" <parameterRule formula=\"3.1 * 4.5\" name=\"parameter_1\"/>\n"
" </listOfRules>\n"
" </model>\n"
"</sbml>\n"

Definition at line 33 of file test000073.h.

Referenced by test_bug1087().

CCopasiDataModel * test000073::pCOPASIDATAMODEL = NULL
staticprotected

Definition at line 34 of file test000073.h.

Referenced by setUp(), and test_bug1087().


The documentation for this class was generated from the following files: