public void test_Reaction_createWithNS() { XMLNamespaces xmlns = new XMLNamespaces(); xmlns.add( "http://www.sbml.org", "testsbml"); SBMLNamespaces sbmlns = new SBMLNamespaces(2,1); sbmlns.addNamespaces(xmlns); Reaction object1 = new Reaction(sbmlns); assertTrue( object1.getTypeCode() == libsbml.SBML_REACTION ); assertTrue( object1.getMetaId() == "" ); assertTrue( object1.getNotes() == null ); assertTrue( object1.getAnnotation() == null ); assertTrue( object1.getLevel() == 2 ); assertTrue( object1.getVersion() == 1 ); assertTrue( object1.getNamespaces() != null ); assertTrue( object1.getNamespaces().getLength() == 2 ); object1 = null; }
public void test_L3_Reaction_createWithNS() { XMLNamespaces xmlns = new XMLNamespaces(); xmlns.add( "http://www.sbml.org", "testsbml"); SBMLNamespaces sbmlns = new SBMLNamespaces(3,1); sbmlns.addNamespaces(xmlns); Reaction r = new Reaction(sbmlns); assertTrue( r.getTypeCode() == libsbml.SBML_REACTION ); assertTrue( r.getMetaId() == "" ); assertTrue( r.getNotes() == null ); assertTrue( r.getAnnotation() == null ); assertTrue( r.getLevel() == 3 ); assertTrue( r.getVersion() == 1 ); assertTrue( r.getNamespaces() != null ); assertTrue( r.getNamespaces().getLength() == 2 ); assertTrue( r.getId() == "" ); assertTrue( r.getName() == "" ); assertTrue( r.getCompartment() == "" ); assertTrue( r.getFast() == false ); assertTrue( r.getReversible() == true ); assertEquals( false, r.isSetId() ); assertEquals( false, r.isSetName() ); assertEquals( false, r.isSetCompartment() ); assertEquals( false, r.isSetFast() ); assertEquals( false, r.isSetReversible() ); r = null; }