Example #1
0
    def test_set_get_test_value(self):
        from libcellml import Reset

        x = Reset()
        self.assertEqual("", x.testValue())

        x.setTestValue("A MathML string.")

        self.assertEqual("A MathML string.", x.testValue())
Example #2
0
    def test_test_value(self):
        from libcellml import Reset

        x = Reset()
        self.assertEqual("", x.testValue())

        x.setTestValue("A MathML string.")
        self.assertEqual("A MathML string.", x.testValue())

        x.appendTestValue(" More MathML.")
        self.assertEqual("A MathML string. More MathML.", x.testValue())

        self.assertEqual("", x.testValueId())
        x.setTestValueId("my_test_value")
        self.assertEqual("my_test_value", x.testValueId())

        x.removeTestValue()
        self.assertEqual("", x.testValue())

        x.removeTestValueId()
        self.assertEqual("", x.testValueId())
Example #3
0
    def test_reset(self):
        from libcellml import Component, Reset

        c = Component()
        r = Reset()
        r.setTestValue('<math></math>')
        c.addReset(r)
        self.assertEqual(1, c.resetCount())
        self.assertTrue(c.hasReset(r))

        rReturned = c.reset(0)
        self.assertEqual(r.testValue(), rReturned.testValue())