diff --git a/tests/test_owlapy_conversions.py b/tests/test_owlapy_conversions.py index df1492b..e7800bb 100644 --- a/tests/test_owlapy_conversions.py +++ b/tests/test_owlapy_conversions.py @@ -4,7 +4,8 @@ from owlapy.owl_individual import OWLNamedIndividual from owlapy.parser import DLSyntaxParser from owlapy.render import DLSyntaxObjectRenderer -from owlapy.class_expression import OWLObjectHasValue +from owlapy.class_expression import OWLObjectHasValue, OWLObjectSomeValuesFrom, OWLObjectOneOf + class TestOWLObjectHasValueConversions(unittest.TestCase): def test_render(self): @@ -20,6 +21,25 @@ def test_render(self): self.assertEqual(rendered_c, "∃ hasChild.{Demir}") + def test_render_multiple_entities(self): + renderer = DLSyntaxObjectRenderer() + NS = "http://example.com/father#" + parser = DLSyntaxParser(NS) + has_child = OWLObjectProperty(IRI(NS, 'hasChild')) + + c = OWLObjectSomeValuesFrom(property=has_child, filler=OWLObjectOneOf([ + OWLNamedIndividual(IRI.create(NS, 'Demir')), + OWLNamedIndividual(IRI.create(NS, 'Luke'))] + )) + + renderer_c = renderer.render(c) + self.assertEqual(renderer_c, "∃ hasChild.{Demir , Luke}") + self.assertEqual(c, parser.parse_expression(renderer_c)) + + + + + if __name__ == '__main__': unittest.main()