Files
CleverRDFlib/features/consistency_checking.feature
CoreRasurae e828acf175
CI / lint (push) Successful in 1m32s
CI / typecheck (push) Successful in 1m38s
CI / lint (pull_request) Successful in 1m30s
CI / typecheck (pull_request) Successful in 1m30s
CI / behave (3.11) (pull_request) Successful in 1m39s
CI / behave (3.12) (pull_request) Successful in 1m39s
CI / build (pull_request) Successful in 1m29s
CI / behave (3.13) (pull_request) Successful in 1m39s
CI / behave (3.11) (push) Successful in 1m39s
CI / behave (3.12) (push) Successful in 1m41s
CI / behave (3.13) (push) Successful in 1m37s
CI / build (push) Successful in 1m30s
feat: Initial version of CleverRDFLib
ISSUES CLOSED: #1
2025-12-19 22:26:14 +00:00

97 lines
4.2 KiB
Gherkin

Feature: Consistency Checking
As a developer using CleverRDFLib
I want to check ontology consistency
So that I can identify logical inconsistencies in OWL ontologies
Background:
Given I have a test data directory
And I have a loaded ontology for consistency checking
And I have a ConsistencyChecker instance
Scenario: Check consistent ontology
Given I have a consistent OWL ontology
When I check the ontology consistency
Then the consistency check should succeed
And there should be no consistency issues
And the consistency result should indicate consistency
Scenario: Check ontology with classes equivalent to owl:Nothing
Given I have an ontology with classes equivalent to owl:Nothing
When I check the ontology consistency
Then the consistency check should complete
And there should be consistency issues
And the issues should indicate classes equivalent to owl:Nothing
Scenario: Check ontology with classes subsuming owl:Nothing
Given I have an ontology with classes that are subclasses of owl:Nothing
When I check the ontology consistency
Then the consistency check should complete
And there should be consistency issues
And the issues should indicate subsumption of owl:Nothing
Scenario: Check ontology with self-disjoint classes
Given I have an ontology with classes that are disjoint with themselves
When I check the ontology consistency
Then the consistency check should complete
And there should be consistency issues
And the issues should indicate self-disjointness
Scenario: Check ontology with circular subclass relationships
Given I have an ontology with circular subclass relationships
When I check the ontology consistency
Then the consistency check should complete
And there should be consistency issues
And the issues should indicate circular relationships
Scenario: Check ontology with conflicting disjoint relationships
Given I have an ontology with conflicting disjoint class relationships
When I check the ontology consistency
Then the consistency check should complete
And there should be consistency issues
And the issues should indicate conflicting disjointness
Scenario: Access consistency result information
Given I have a consistency result with issues
When I request the consistency issues
Then I should receive a list of ConsistencyIssue instances
And each issue should contain issue type, message, and resource
When I check if the ontology is consistent
Then I should receive False if issues exist
When I request the issue count
Then I should receive the number of issues
And the count should match the number of issue entries
Given I have a consistent OWL ontology
And I have checked the ontology consistency
When I check if the ontology is consistent
Then I should receive True if no issues exist
Scenario: Get issues by type
Given I have a consistency result with multiple issue types
When I request issues of a specific type
Then I should receive only issues of that type
And the filtered issues should match the type
Scenario: Find unsatisfiable classes using find_unsatisfiable_classes
Given I have an ontology with classes equivalent to owl:Nothing
When I find unsatisfiable classes using find_unsatisfiable_classes
Then I should receive a list of unsatisfiable class URIs
And the list should contain the unsatisfiable classes
Scenario: Access ConsistencyIssue properties
Given I have a consistency result with issues
When I access the issue_type property of an issue
Then I should receive the issue type string
When I access the resource property of an issue
Then I should receive the resource URI or None for consistency issue
When I access the message property of an issue
Then I should receive the issue message string
Scenario: Access ConsistencyIssue __repr__
Given I have a consistency result with issues
When I call __repr__ on an issue with a resource
Then I should receive a string representation with resource
Given I have a consistency result with issues without resources
When I call __repr__ on an issue without a resource
Then I should receive a string representation without resource