[tracker: 18/21] DomainIndexAddTest: fix problem of using multipe value property as a domain index




commit 5b302b7dc2a53bbd09382e49e60bdd9e74f39e23
Author: Abanoub Ghadban <abanoub gdb gmail com>
Date:   Fri Aug 20 15:22:19 2021 +0200

    DomainIndexAddTest: fix problem of using multipe value property as a domain index
    
    DomainIndexAddTest was using test:a_n_cardinality property as a domain index which is not supported in 
tracker.
    Only single value properties can be used as a domain index.
    So, it used test:a_int property instead of test:a_n_cardinality as the domain index for class test:C.

 tests/functional-tests/ontology-changes.py                        | 8 ++++----
 .../test-ontologies/add-domainIndex/91-test.ontology              | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tests/functional-tests/ontology-changes.py b/tests/functional-tests/ontology-changes.py
index f1021a805..83e236fb2 100644
--- a/tests/functional-tests/ontology-changes.py
+++ b/tests/functional-tests/ontology-changes.py
@@ -682,13 +682,13 @@ class DomainIndexAddTest (OntologyChangeTestTemplate):
         self.tracker.update ("""
             INSERT { <%s> a test:B ;
                         test:a_string 'test-value' ;
-                        test:a_n_cardinality 'another-test-value'. }""" % (self.instance_a))
+                        test:a_int 5. }""" % (self.instance_a))
 
         self.instance_b = "test://ontology-changes/properties/add-domain-index/b"
         self.tracker.update ("""
             INSERT { <%s> a test:C ;
                         test:a_string 'test-value' ;
-                        test:a_n_cardinality 'another-test-value'. }""" % (self.instance_b))
+                        test:a_int 6. }""" % (self.instance_b))
 
     def validate_status(self):
         # Check the ontology
@@ -697,7 +697,7 @@ class DomainIndexAddTest (OntologyChangeTestTemplate):
         self.assertTrue(has_domainIndex)
 
         has_domainIndex = self.tracker.ask(
-            "ASK { test:C nrl:domainIndex test:a_n_cardinality }")
+            "ASK { test:C nrl:domainIndex test:a_int }")
         self.assertTrue(has_domainIndex)
 
         # Check the data
@@ -706,7 +706,7 @@ class DomainIndexAddTest (OntologyChangeTestTemplate):
         self.assertTrue(dataok)
 
         dataok = self.tracker.ask(
-            "ASK { <%s> test:a_n_cardinality 'another-test-value' }" % (self.instance_b))
+            "ASK { <%s> test:a_int 6 }" % (self.instance_b))
         self.assertTrue(dataok)
 
 
diff --git a/tests/functional-tests/test-ontologies/add-domainIndex/91-test.ontology 
b/tests/functional-tests/test-ontologies/add-domainIndex/91-test.ontology
index b67d63098..d11f79e06 100644
--- a/tests/functional-tests/test-ontologies/add-domainIndex/91-test.ontology
+++ b/tests/functional-tests/test-ontologies/add-domainIndex/91-test.ontology
@@ -74,7 +74,7 @@ test:b_property_n a rdf:Property ;
 
 # ****** TEST CHANGE *****
 test:C a rdfs:Class ;
-    nrl:domainIndex test:a_n_cardinality ;
+    nrl:domainIndex test:a_int ;
     rdfs:subClassOf test:A .
 # *************************
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]