diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 8db1bb8f..afcb8a3a 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -28,6 +28,7 @@ all: \ location_PASS_validation.ttl \ location_XFAIL_validation.ttl \ message_thread_PASS_validation.ttl \ + message_thread_XFAIL_validation.ttl \ relationship_PASS_validation.ttl \ relationship_XFAIL_validation.ttl \ thread_PASS_validation.ttl \ @@ -82,6 +83,7 @@ check: \ location_PASS_validation.ttl \ location_XFAIL_validation.ttl \ message_thread_PASS_validation.ttl \ + message_thread_XFAIL_validation.ttl \ relationship_PASS_validation.ttl \ relationship_XFAIL_validation.ttl \ thread_PASS_validation.ttl \ diff --git a/tests/examples/message_thread_XFAIL.json b/tests/examples/message_thread_XFAIL.json new file mode 100644 index 00000000..beb440a3 --- /dev/null +++ b/tests/examples/message_thread_XFAIL.json @@ -0,0 +1,219 @@ +{ + "@context": { + "co": "http://purl.org/co/", + "kb": "http://example.org/kb/", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "observable": "https://ontology.unifiedcyberontology.org/uco/observable/", + "types": "https://ontology.unifiedcyberontology.org/uco/types/", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "kb:message-1", + "@type": "observable:ObservableObject", + "rdfs:comment": "The non-Message class will trigger errors pertaining to co:element, co:itemContent and types:threadOriginItem." + }, + { + "@id": "kb:message-2", + "@type": "observable:Message" + }, + { + "@id": "kb:message-3", + "@type": "observable:Message" + }, + { + "@id": "kb:message-4", + "@type": "observable:Message" + }, + { + "@id": "kb:message-5", + "@type": "observable:Message" + }, + { + "@id": "kb:message-6", + "@type": "observable:ObservableObject", + "rdfs:comment": "The non-Message class will trigger errors pertaining to co:element, co:itemContent and types:threadTerminalItem." + }, + { + "@id": "kb:message-7", + "@type": "observable:Message" + }, + { + "@id": "kb:message-thread-2", + "@type": "observable:MessageThread", + "core:hasFacet": { + "@type": "observable:MessageThreadFacet", + "observable:message": [ + { + "@id": "kb:message-1" + }, + { + "@id": "kb:message-2" + }, + { + "@id": "kb:message-3" + }, + { + "@id": "kb:message-4" + }, + { + "@id": "kb:message-5" + }, + { + "@id": "kb:message-6" + } + ], + "observable:messageThread": { + "@id": "kb:thread-2" + } + } + }, + { + "@id": "kb:thread-2", + "@type": "types:Thread", + "co:size": { + "@type": "xsd:nonNegativeInteger", + "@value": "6" + }, + "co:element": [ + { + "@id": "kb:message-1" + }, + { + "@id": "kb:message-2" + }, + { + "@id": "kb:message-3" + }, + { + "@id": "kb:message-4" + }, + { + "@id": "kb:message-5" + }, + { + "@id": "kb:message-6" + } + ], + "co:item": [ + + { + "@id": "kb:message-thread-2-item-1" + }, + { + "@id": "kb:message-thread-2-item-2" + }, + { + "@id": "kb:message-thread-2-item-3" + }, + { + "@id": "kb:message-thread-2-item-4" + }, + { + "@id": "kb:message-thread-2-item-5" + }, + { + "@id": "kb:message-thread-2-item-6" + } + + ], + "types:threadOriginItem": [ + { + "@id": "kb:message-thread-2-item-1" + }, + { + "@id": "kb:message-thread-2-item-5" + } + ], + "types:threadTerminalItem": [ + { + "@id": "kb:message-thread-2-item-3" + }, + { + "@id": "kb:message-thread-2-item-4" + }, + { + "@id": "kb:message-thread-2-item-6" + } + ] + }, + { + "@id": "kb:message-thread-2-item-1", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-1" + }, + "types:threadNextItem": [ + { + "@id": "kb:message-thread-2-item-2" + }, + { + "@id": "kb:message-thread-2-item-6" + } + ] + }, + { + "@id": "kb:message-thread-2-item-2", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-2" + }, + "types:threadNextItem": [ + { + "@id": "kb:message-thread-2-item-3" + }, + { + "@id": "kb:message-thread-2-item-4" + } + ], + "types:threadPreviousItem": { + "@id": "kb:message-thread-2-item-1" + } + }, + { + "@id": "kb:message-thread-2-item-3", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-3" + }, + "types:threadPreviousItem": { + "@id": "kb:message-thread-2-item-2" + } + }, + { + "@id": "kb:message-thread-2-item-4", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-4" + }, + "types:threadPreviousItem": { + "@id": "kb:message-thread-2-item-2" + } + }, + { + "@id": "kb:message-thread-2-item-5", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-5" + }, + "types:threadNextItem": { + "@id": "kb:message-thread-2-item-6" + } + }, + { + "@id": "kb:message-thread-2-item-6", + "@type": "types:ThreadItem", + "co:itemContent": { + "@id": "kb:message-6" + }, + "types:threadPreviousItem": [ + { + "@id": "kb:message-thread-2-item-1" + }, + { + "@id": "kb:message-thread-2-item-5" + } + ] + } + ] +} diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index b48cc765..e58abf2e 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -317,6 +317,9 @@ def test_message_thread(monolithic_ontology_graph: rdflib.Graph) -> None: def test_message_thread_PASS_validation(): confirm_validation_results("message_thread_PASS_validation.ttl", True) +def test_message_thread_XFAIL_validation(): + confirm_validation_results("message_thread_XFAIL_validation.ttl", False) + def test_relationship_PASS_partial() -> None: """ This test should be replaced with test_relationship_XFAIL_full when the semi-open vocabulary design current as of UCO 0.8.0 is re-done.