Example #1
0
 public void test_L3_LocalParameter_value()
 {
     assertEquals(false, P.isSetValue());
     assertEquals(true, double.IsNaN(P.getValue()));
     P.setValue(1.5);
     assertEquals(true, P.isSetValue());
     assertTrue(P.getValue() == 1.5);
     P.unsetValue();
     assertEquals(false, P.isSetValue());
     assertEquals(true, double.IsNaN(P.getValue()));
 }
        public void test_WriteL3SBML_KineticLaw_ListOfParameters()
        {
            string expected = "<kineticLaw>\n" +
                              "  <listOfLocalParameters>\n" +
                              "    <localParameter id=\"n\" value=\"1.2\"/>\n" +
                              "  </listOfLocalParameters>\n" +
                              "</kineticLaw>";
            KineticLaw     kl = D.createModel().createReaction().createKineticLaw();
            LocalParameter p  = kl.createLocalParameter();

            p.setId("n");
            p.setValue(1.2);
            assertEquals(true, equals(expected, kl.toSBML()));
        }