public void test_SBMLDocument_createWith() { SBMLDocument d = new SBMLDocument(1,2); assertTrue( d.getTypeCode() == libsbml.SBML_DOCUMENT ); assertTrue( d.getNotes() == null ); assertTrue( d.getAnnotation() == null ); assertTrue( d.getLevel() == 1 ); assertTrue( d.getVersion() == 2 ); assertTrue( d.getNumErrors() == 0 ); d = null; }
public void test_ReadSBML_notes_sbml_L2() { string s = wrapXML("<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\"> " + " <notes>" + " <html xmlns=\"http://www.w3.org/1999/xhtml\">" + " </html>" + " </notes>" + " <model>" + " </model>" + " </sbml>"); D = libsbml.readSBMLFromString(s); assertTrue( D.getNotes() != null ); assertTrue( D.getNumErrors() == 0 ); }
public void test_ReadSBML_notes_sbml() { string s = wrapXML("<sbml level='1' version='1'>" + " <notes>Notes are not allowed as part of the SBML element.</notes>" + "</sbml>"); D = libsbml.readSBMLFromString(s); assertTrue( D.getNotes() != null ); string notes = D.getNotes().getChild(0).getCharacters(); assertTrue( ( "Notes are not allowed as part of the SBML element." != notes ) == false ); assertTrue( D.getNumErrors() > 0 ); }