当前位置: 首页>>代码示例>>C#>>正文


C# Species.getId方法代码示例

本文整理汇总了C#中libsbmlcs.Species.getId方法的典型用法代码示例。如果您正苦于以下问题:C# Species.getId方法的具体用法?C# Species.getId怎么用?C# Species.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在libsbmlcs.Species的用法示例。


在下文中一共展示了Species.getId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: test_Species_setId4

 public void test_Species_setId4()
 {
     Species c = new  Species(2,2);
       int i = c.setId( "cell");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( true, c.isSetId() );
       assertTrue((  "cell"  == c.getId() ));
       i = c.setId("");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetId() );
       c = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:12,代码来源:TestSpecies_newSetters.cs

示例2: test_Model_getSpecies

 public void test_Model_getSpecies()
 {
     Species s1 = new  Species(2,4);
       Species s2 = new  Species(2,4);
       s1.setId( "Glucose"     );
       s2.setId( "Glucose_6_P" );
       s1.setCompartment( "c");
       s2.setCompartment( "c");
       M.addSpecies(s1);
       M.addSpecies(s2);
       assertTrue( M.getNumSpecies() == 2 );
       s1 = M.getSpecies(0);
       s2 = M.getSpecies(1);
       assertTrue((  "Glucose"      == s1.getId() ));
       assertTrue((  "Glucose_6_P"  == s2.getId() ));
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:16,代码来源:TestModel.cs

示例3: test_L3_Species_createWithNS

 public void test_L3_Species_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Species s = new  Species(sbmlns);
       assertTrue( s.getTypeCode() == libsbml.SBML_SPECIES );
       assertTrue( s.getMetaId() == "" );
       assertTrue( s.getNotes() == null );
       assertTrue( s.getAnnotation() == null );
       assertTrue( s.getLevel() == 3 );
       assertTrue( s.getVersion() == 1 );
       assertTrue( s.getNamespaces() != null );
       assertTrue( s.getNamespaces().getLength() == 2 );
       assertTrue( s.getId() == "" );
       assertTrue( s.getName() == "" );
       assertTrue( s.getCompartment() == "" );
       assertEquals( true, isnan(s.getInitialAmount()) );
       assertEquals( true, isnan(s.getInitialConcentration()) );
       assertTrue( s.getSubstanceUnits() == "" );
       assertTrue( s.getHasOnlySubstanceUnits() == false );
       assertTrue( s.getBoundaryCondition() == false );
       assertTrue( s.getConstant() == false );
       assertTrue( s.getConversionFactor() == "" );
       assertEquals( false, s.isSetId() );
       assertEquals( false, s.isSetName() );
       assertEquals( false, s.isSetCompartment() );
       assertEquals( false, s.isSetInitialAmount() );
       assertEquals( false, s.isSetInitialConcentration() );
       assertEquals( false, s.isSetSubstanceUnits() );
       assertEquals( false, s.isSetHasOnlySubstanceUnits() );
       assertEquals( false, s.isSetBoundaryCondition() );
       assertEquals( false, s.isSetConstant() );
       assertEquals( false, s.isSetConversionFactor() );
       s = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:37,代码来源:TestL3Species.cs

示例4: test_L3_Species_initDefaults

 public void test_L3_Species_initDefaults()
 {
     Species s = new  Species(3,1);
       assertTrue( s.getId() == "" );
       assertTrue( s.getName() == "" );
       assertTrue( s.getCompartment() == "" );
       assertEquals( true, isnan(s.getInitialAmount()) );
       assertEquals( true, isnan(s.getInitialConcentration()) );
       assertTrue( s.getSubstanceUnits() == "" );
       assertTrue( s.getHasOnlySubstanceUnits() == false );
       assertTrue( s.getBoundaryCondition() == false );
       assertTrue( s.getConstant() == false );
       assertTrue( s.getConversionFactor() == "" );
       assertEquals( false, s.isSetId() );
       assertEquals( false, s.isSetName() );
       assertEquals( false, s.isSetCompartment() );
       assertEquals( false, s.isSetInitialAmount() );
       assertEquals( false, s.isSetInitialConcentration() );
       assertEquals( false, s.isSetSubstanceUnits() );
       assertEquals( false, s.isSetHasOnlySubstanceUnits() );
       assertEquals( false, s.isSetBoundaryCondition() );
       assertEquals( false, s.isSetConstant() );
       assertEquals( false, s.isSetConversionFactor() );
       s.initDefaults();
       assertTrue( s.getId() == "" );
       assertTrue( s.getName() == "" );
       assertTrue( s.getCompartment() == "" );
       assertEquals( true, isnan(s.getInitialAmount()) );
       assertEquals( true, isnan(s.getInitialConcentration()) );
       assertTrue(( "mole"  == s.getSubstanceUnits() ));
       assertTrue( s.getHasOnlySubstanceUnits() == false );
       assertTrue( s.getBoundaryCondition() == false );
       assertTrue( s.getConstant() == false );
       assertTrue( s.getConversionFactor() == "" );
       assertEquals( false, s.isSetId() );
       assertEquals( false, s.isSetName() );
       assertEquals( false, s.isSetCompartment() );
       assertEquals( false, s.isSetInitialAmount() );
       assertEquals( false, s.isSetInitialConcentration() );
       assertEquals( true, s.isSetSubstanceUnits() );
       assertEquals( true, s.isSetHasOnlySubstanceUnits() );
       assertEquals( true, s.isSetBoundaryCondition() );
       assertEquals( true, s.isSetConstant() );
       assertEquals( false, s.isSetConversionFactor() );
       s = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:46,代码来源:TestL3Species.cs

示例5: test_Species_copyConstructor

 public void test_Species_copyConstructor()
 {
     Species o1 = new Species(2,4);
       o1.setId("c");
       o1.setSpeciesType("c1");
       assertTrue( o1.getId() ==  "c" );
       assertEquals(o1.getSpeciesType(), "c1");
       Species o2 = new Species(o1);
       assertTrue( o2.getId() ==  "c" );
       assertEquals(o2.getSpeciesType(), "c1");
       assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() );
       o2 = null;
       o1 = null;
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:14,代码来源:TestCopyAndClone.cs


注:本文中的libsbmlcs.Species.getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。