本文整理汇总了C#中libsbml.SBMLDocument.getError方法的典型用法代码示例。如果您正苦于以下问题:C# SBMLDocument.getError方法的具体用法?C# SBMLDocument.getError怎么用?C# SBMLDocument.getError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libsbml.SBMLDocument
的用法示例。
在下文中一共展示了SBMLDocument.getError方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: test_internal_consistency_check_99902
public void test_internal_consistency_check_99902()
{
SBMLDocument d = new SBMLDocument(2,4);
long errors;
Compartment c = new Compartment(2,4);
d.setLevelAndVersion(1,2,false);
Model m = d.createModel();
c.setCompartmentType("hh");
c.setId("c");
m.addCompartment(c);
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 10103 );
d = null;
}
示例2: test_WriteSBML_error
public void test_WriteSBML_error()
{
SBMLDocument d = new SBMLDocument();
SBMLWriter w = new SBMLWriter();
assertEquals( false, w.writeSBML(d, "/tmp/impossible/path/should/fail") );
assertTrue( d.getNumErrors() == 1 );
assertTrue( d.getError(0).getErrorId() == libsbml.XMLFileUnwritable );
d = null;
w = null;
}
示例3: test_internal_consistency_check_99911_model
public void test_internal_consistency_check_99911_model()
{
SBMLDocument d = new SBMLDocument(2,4);
long errors;
d.setLevelAndVersion(2,1,false);
Model m = new Model(2,4);
m.setSBOTerm(2);
d.setModel(m);
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20201 );
d = null;
}
示例4: test_internal_consistency_check_99904_model
public void test_internal_consistency_check_99904_model()
{
SBMLDocument d = new SBMLDocument(2,4);
long errors;
d.setLevelAndVersion(1,2,false);
Model m = new Model(2,4);
Compartment c = m.createCompartment();
c.setId("cc");
m.setMetaId("mmm");
d.setModel(m);
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20201 );
d = null;
}