diff --git a/tests/test_owlapy_conversions.py b/tests/test_owlapy_conversions.py index e7800bb..936ffa7 100644 --- a/tests/test_owlapy_conversions.py +++ b/tests/test_owlapy_conversions.py @@ -4,7 +4,7 @@ from owlapy.owl_individual import OWLNamedIndividual from owlapy.parser import DLSyntaxParser from owlapy.render import DLSyntaxObjectRenderer -from owlapy.class_expression import OWLObjectHasValue, OWLObjectSomeValuesFrom, OWLObjectOneOf +from owlapy.class_expression import OWLObjectHasValue, OWLObjectSomeValuesFrom, OWLObjectOneOf, OWLObjectAllValuesFrom class TestOWLObjectHasValueConversions(unittest.TestCase): @@ -21,6 +21,7 @@ def test_render(self): self.assertEqual(rendered_c, "∃ hasChild.{Demir}") + def test_render_multiple_entities(self): renderer = DLSyntaxObjectRenderer() NS = "http://example.com/father#" @@ -36,6 +37,22 @@ def test_render_multiple_entities(self): self.assertEqual(renderer_c, "∃ hasChild.{Demir , Luke}") self.assertEqual(c, parser.parse_expression(renderer_c)) + + def test_render_for_all_multiplie_entities(self): + renderer = DLSyntaxObjectRenderer() + NS = "http://example.com/father#" + parser = DLSyntaxParser(NS) + has_child = OWLObjectProperty(IRI(NS, 'hasChild')) + + c = OWLObjectAllValuesFrom(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)) + +