本文整理汇总了C#中libsbmlcs.Species.isSetSubstanceUnits方法的典型用法代码示例。如果您正苦于以下问题:C# Species.isSetSubstanceUnits方法的具体用法?C# Species.isSetSubstanceUnits怎么用?C# Species.isSetSubstanceUnits使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libsbmlcs.Species
的用法示例。
在下文中一共展示了Species.isSetSubstanceUnits方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: test_Species_setSubstanceUnits4
public void test_Species_setSubstanceUnits4()
{
Species c = new Species(2,2);
int i = c.setSubstanceUnits( "mole");
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue(( "mole" == c.getSubstanceUnits() ));
assertEquals( true, c.isSetSubstanceUnits() );
i = c.setSubstanceUnits("");
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertEquals( false, c.isSetSubstanceUnits() );
c = null;
}
示例2: 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;
}
示例3: test_Species_setSubstanceUnits2
public void test_Species_setSubstanceUnits2()
{
Species c = new Species(2,2);
int i = c.setSubstanceUnits( "1cell");
assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
assertEquals( false, c.isSetSubstanceUnits() );
c = null;
}
示例4: 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;
}