Exemplo n.º 1
0
 public void test_WriteSBML_FunctionDefinition_withSBO()
 {
     string expected = "<functionDefinition id=\"pow3\" sboTerm=\"SBO:0000064\">\n" +
     "  <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n" +
     "    <lambda>\n" +
     "      <bvar>\n" +
     "        <ci> x </ci>\n" +
     "      </bvar>\n" +
     "      <apply>\n" +
     "        <power/>\n" +
     "        <ci> x </ci>\n" +
     "        <cn type=\"integer\"> 3 </cn>\n" +
     "      </apply>\n" +
     "    </lambda>\n" +
     "  </math>\n" +
     "</functionDefinition>";
       FunctionDefinition fd = new FunctionDefinition ( 2,4 );
       fd.setId("pow3");
       fd.setMath(libsbml.parseFormula("lambda(x, x^3)"));
       fd.setSBOTerm(64);
       assertEquals( true, equals(expected,fd.toSBML()) );
 }