Package laas.openrobots.ontology.tests
Class OpenRobotsOntologyTest
java.lang.Object
laas.openrobots.ontology.tests.OpenRobotsOntologyTest
This class holds unit tests that cover most of the
For the tests to be executed, the
oro-server
features.For the tests to be executed, the
oro_test.owl
ontology is required, and must be referenced by the oro_test.conf
configuration file.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStmnt()
This test add a new statement to the ontology (a new instance of the class Class1 and then query the ontology to check the individual was successfully added, with the right namespace.void
This test add statements to the ontology with different memory models and checks that everything behave as expected (for instance, short term statements must be removed after a while).void
This test add a new statement with a literal as object to the ontology (a new instance of the class Class1 and then query the ontology to check the individual was successfully added, with the right namespace.void
This tests the diff and similar function in complex hierarchies of classes.void
This tests corner cases for the discrinimate method.void
This test checks that the Remove and Clear methods work as expected.void
This test checks that the Alterite module works as expected regarding addition of agents.void
This test checks Alterite module general methods.void
This tests ability for the cognitive kernel to extract categories from a set of concept.void
check()
Check that some facts are correctly asserted/infered in the ontology.void
classOf()
This test checks the behaviour of the server when the class of a resource is requested.void
clear()
This test checks that statements that are addable can be removed as well.void
Tests ontology consistency checking.void
This tests the differences function that extracts different properties between concepts.void
This tests ability for the cognitive kernel to find discriniment features in a set of concepts.void
find()
This test try to match a given set of statements against the ontology, and to get back the class of an object.void
Same as testFind(), but inside the AlteriteModulevoid
This tests the find() method when it returns several variables.void
getInfos()
This test retrieve in the ontology details about a resource.void
This test is exactly the same asinvalid reference
#testGetInfos()
void
BASIC TESTS *void
This test add several new statements and test basic inference mechanisms.void
literals()
This test try to create statements with various types of literals.void
lookup()
This test checks that concept can be retrieved by their labels.void
query()
Performs a simple query on the ontology to check OWL loading and SPARQL query engine both work.void
races()
This test checks race condition issues that may arise in a concurrent execution.void
This test checks race condition issues that may arise in a concurrent execution, within the Alterite module.void
reset()
void
void
This test tests the "safe" add that avoid leading the ontology in a inconsistent state.void
save()
void
This tests the similarities function that extracts common features between concepts.void
void
void
This test checks that sub- and superclasses are correctly inferred.void
update()
This test checks the statement update mechanism.
-
Constructor Details
-
OpenRobotsOntologyTest
public OpenRobotsOntologyTest()
-
-
Method Details
-
helpersFunction
public void helpersFunction()BASIC TESTS * -
socketConnectorRequestParser
public void socketConnectorRequestParser() -
rulesTokenizer
public void rulesTokenizer() -
reset
public void reset() -
save
public void save() -
check
public void check()Check that some facts are correctly asserted/infered in the ontology. -
query
public void query()Performs a simple query on the ontology to check OWL loading and SPARQL query engine both work. The query should return the list of instances present in the ontology. -
getInfos
This test retrieve in the ontology details about a resource. Result should be similar to Protege's [class|property|individual usage panel.- Throws:
IllegalStatementException
-
getInfosDefaultNs
This test is exactly the same asinvalid reference
#testGetInfos()
- Throws:
IllegalStatementException
-
addStmnt
public void addStmnt()This test add a new statement to the ontology (a new instance of the class Class1 and then query the ontology to check the individual was successfully added, with the right namespace. -
addStmntWithLiteral
public void addStmntWithLiteral()This test add a new statement with a literal as object to the ontology (a new instance of the class Class1 and then query the ontology to check the individual was successfully added, with the right namespace. -
safeAddStmnt
public void safeAddStmnt()This test tests the "safe" add that avoid leading the ontology in a inconsistent state. -
addStmntInMemory
This test add statements to the ontology with different memory models and checks that everything behave as expected (for instance, short term statements must be removed after a while).- Throws:
InterruptedException
-
clear
This test checks that statements that are addable can be removed as well.- Throws:
InterruptedException
-
consistency
public void consistency()Tests ontology consistency checking. -
update
public void update()This test checks the statement update mechanism. -
lookup
This test checks that concept can be retrieved by their labels.- Throws:
InterruptedException
-
subSuperClasses
This test checks that sub- and superclasses are correctly inferred.- Throws:
InterruptedException
-
classOf
This test checks the behaviour of the server when the class of a resource is requested.- Throws:
InterruptedException
-
literals
public void literals()This test try to create statements with various types of literals. -
advancedRemoveAndClear
public void advancedRemoveAndClear()This test checks that the Remove and Clear methods work as expected. -
stmtConsistency
public void stmtConsistency() -
find
public void find()This test try to match a given set of statements against the ontology, and to get back the class of an object. -
findForAgent
public void findForAgent()Same as testFind(), but inside the AlteriteModule -
findMultipleVariables
public void findMultipleVariables()This tests the find() method when it returns several variables. -
inference
public void inference()This test add several new statements and test basic inference mechanisms. -
similarities
public void similarities()This tests the similarities function that extracts common features between concepts. -
differences
public void differences()This tests the differences function that extracts different properties between concepts. -
advancedDiff
public void advancedDiff()This tests the diff and similar function in complex hierarchies of classes. -
discriminent
public void discriminent()This tests ability for the cognitive kernel to find discriniment features in a set of concepts. -
advancedDiscriminent
public void advancedDiscriminent()This tests corner cases for the discrinimate method. -
categorization
public void categorization()This tests ability for the cognitive kernel to extract categories from a set of concept. -
alteriteModule1
This test checks that the Alterite module works as expected regarding addition of agents.- Throws:
IllegalStatementException
-
alteriteModule2
This test checks Alterite module general methods.- Throws:
IllegalStatementException
-
races
public void races()This test checks race condition issues that may arise in a concurrent execution. -
racesForAgent
public void racesForAgent()This test checks race condition issues that may arise in a concurrent execution, within the Alterite module.
-