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 TypeMethodDescriptionvoidaddStmnt()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.voidThis 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).voidThis 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.voidThis tests the diff and similar function in complex hierarchies of classes.voidThis tests corner cases for the discrinimate method.voidThis test checks that the Remove and Clear methods work as expected.voidThis test checks that the Alterite module works as expected regarding addition of agents.voidThis test checks Alterite module general methods.voidThis tests ability for the cognitive kernel to extract categories from a set of concept.voidcheck()Check that some facts are correctly asserted/infered in the ontology.voidclassOf()This test checks the behaviour of the server when the class of a resource is requested.voidclear()This test checks that statements that are addable can be removed as well.voidTests ontology consistency checking.voidThis tests the differences function that extracts different properties between concepts.voidThis tests ability for the cognitive kernel to find discriniment features in a set of concepts.voidfind()This test try to match a given set of statements against the ontology, and to get back the class of an object.voidSame as testFind(), but inside the AlteriteModulevoidThis tests the find() method when it returns several variables.voidgetInfos()This test retrieve in the ontology details about a resource.voidThis test is exactly the same asexcept we don't specify any namespaces.invalid reference
#testGetInfos()voidBASIC TESTS *voidThis test add several new statements and test basic inference mechanisms.voidliterals()This test try to create statements with various types of literals.voidlookup()This test checks that concept can be retrieved by their labels.voidquery()Performs a simple query on the ontology to check OWL loading and SPARQL query engine both work.voidraces()This test checks race condition issues that may arise in a concurrent execution.voidThis test checks race condition issues that may arise in a concurrent execution, within the Alterite module.voidreset()voidvoidThis test tests the "safe" add that avoid leading the ontology in a inconsistent state.voidsave()voidThis tests the similarities function that extracts common features between concepts.voidvoidvoidThis test checks that sub- and superclasses are correctly inferred.voidupdate()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 asexcept we don't specify any namespaces. It should use the default one.invalid 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.
-