當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。