def test_get_component(self): from libcellml import Error, Component # ComponentPtr getComponent() e = Error() self.assertIsNone(e.getComponent()) name = 'cellml' c = Component() c.setName(name) e.setComponent(c) self.assertIsInstance(e.getComponent(), Component) self.assertEqual(e.getComponent().getName(), name)
def test_get_import_source(self): from libcellml import Error, ImportSource # ImportSourcePtr getImportSource() e = Error() self.assertIsNone(e.getComponent()) name = 'uri' i = ImportSource() i.setId(name) e.setImportSource(i) self.assertIsInstance(e.getImportSource(), ImportSource) self.assertEqual(e.getImportSource().getId(), name)