END_TEST START_TEST (test_WriteL3SBML_Species_conversionFactor) { const char* expected = "<species id=\"Ca2\" compartment=\"cell\"" " hasOnlySubstanceUnits=\"false\"" " boundaryCondition=\"true\" constant=\"true\"" " conversionFactor=\"p\"/>"; const char* expected1 = "<species id=\"Ca2\" compartment=\"cell\"" " hasOnlySubstanceUnits=\"false\"" " boundaryCondition=\"true\" constant=\"true\"/>"; Species *s = D->createModel()->createSpecies(); s->setId("Ca2"); s->setCompartment("cell"); s->setBoundaryCondition(true); s->setHasOnlySubstanceUnits(false); s->setConstant(true); s->setConversionFactor("p"); char* sbml = s->toSBML(); fail_unless( equals(expected, sbml) ); safe_free(sbml); s->unsetConversionFactor(); sbml = s->toSBML(); fail_unless( equals(expected1, sbml) ); safe_free(sbml); }
END_TEST START_TEST (test_WriteL3SBML_Species) { const char* expected = "<species id=\"Ca2\" compartment=\"cell\" initialAmount=\"0.7\"" " substanceUnits=\"mole\" hasOnlySubstanceUnits=\"false\"" " boundaryCondition=\"true\" constant=\"true\"/>"; Species *s = D->createModel()->createSpecies(); s->setId("Ca2"); s->setCompartment("cell"); s->setInitialAmount(0.7); s->setUnits("mole"); s->setBoundaryCondition(true); s->setHasOnlySubstanceUnits(false); s->setConstant(true); char* sbml = s->toSBML(); fail_unless( equals(expected, sbml) ); safe_free(sbml); }