本文整理汇总了C#中libsbmlcs.Reaction.getNumProducts方法的典型用法代码示例。如果您正苦于以下问题:C# Reaction.getNumProducts方法的具体用法?C# Reaction.getNumProducts怎么用?C# Reaction.getNumProducts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libsbmlcs.Reaction
的用法示例。
在下文中一共展示了Reaction.getNumProducts方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: test_Reaction_addProduct1
public void test_Reaction_addProduct1()
{
Reaction m = new Reaction(2,2);
SpeciesReference p = new SpeciesReference(2,2);
SpeciesReference p1 = new SpeciesReference(2,2);
p1.setSpecies( "k");
p1.setId( "k1");
int i = m.addProduct(p);
assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
p.setSpecies( "k");
p.setId( "k1");
i = m.addProduct(p);
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue( m.getNumProducts() == 1 );
i = m.addProduct(p1);
assertTrue( i == libsbml.LIBSBML_DUPLICATE_OBJECT_ID );
assertTrue( m.getNumProducts() == 1 );
p = null;
p1 = null;
m = null;
}
示例2: test_Reaction_addProduct3
public void test_Reaction_addProduct3()
{
Reaction m = new Reaction(2,2);
SpeciesReference p = new SpeciesReference(1,2);
p.setSpecies( "k");
int i = m.addProduct(p);
assertTrue( i == libsbml.LIBSBML_LEVEL_MISMATCH );
assertTrue( m.getNumProducts() == 0 );
p = null;
m = null;
}
示例3: test_Reaction_createProduct
public void test_Reaction_createProduct()
{
Reaction m = new Reaction(2,2);
SpeciesReference p = m.createProduct();
assertTrue( m.getNumProducts() == 1 );
assertTrue( (p).getLevel() == 2 );
assertTrue( (p).getVersion() == 2 );
m = null;
}
示例4: test_Reaction_addProduct4
public void test_Reaction_addProduct4()
{
Reaction m = new Reaction(2,2);
SpeciesReference p = null;
int i = m.addProduct(p);
assertTrue( i == libsbml.LIBSBML_OPERATION_FAILED );
assertTrue( m.getNumProducts() == 0 );
m = null;
}