getError() public méthode

public getError ( long n ) : SBMLError
n long
Résultat SBMLError
 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;
 }
Exemple #2
0
 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;
 }
 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;
 }
 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;
 }