Class OpenRobotsOntologyTest


  • public class OpenRobotsOntologyTest
    extends java.lang.Object
    This class holds unit tests that cover most of 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      void 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).
      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.
      void advancedDiff()
      This tests the diff and similar function in complex hierarchies of classes.
      void advancedDiscriminent()
      This tests corner cases for the discrinimate method.
      void advancedRemoveAndClear()
      This test checks that the Remove and Clear methods work as expected.
      void alteriteModule1()
      This test checks that the Alterite module works as expected regarding addition of agents.
      void alteriteModule2()
      This test checks Alterite module general methods.
      void categorization()
      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 consistency()
      Tests ontology consistency checking.
      void differences()
      This tests the differences function that extracts different properties between concepts.
      void discriminent()
      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 findForAgent()
      Same as testFind(), but inside the AlteriteModule
      void findMultipleVariables()
      This tests the find() method when it returns several variables.
      void getInfos()
      This test retrieve in the ontology details about a resource.
      void getInfosDefaultNs()
      This test is exactly the same as #testGetInfos() except we don't specify any namespaces.
      void helpersFunction()
      BASIC TESTS *
      void inference()
      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 racesForAgent()
      This test checks race condition issues that may arise in a concurrent execution, within the Alterite module.
      void reset()  
      void rulesTokenizer()  
      void safeAddStmnt()
      This test tests the "safe" add that avoid leading the ontology in a inconsistent state.
      void save()  
      void similarities()
      This tests the similarities function that extracts common features between concepts.
      void socketConnectorRequestParser()  
      void stmtConsistency()  
      void subSuperClasses()
      This test checks that sub- and superclasses are correctly inferred.
      void update()
      This test checks the statement update mechanism.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OpenRobotsOntologyTest

        public OpenRobotsOntologyTest()
    • Method Detail

      • 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.
      • 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

        public void addStmntInMemory()
                              throws java.lang.InterruptedException
        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:
        java.lang.InterruptedException
      • clear

        public void clear()
                   throws java.lang.InterruptedException
        This test checks that statements that are addable can be removed as well.
        Throws:
        java.lang.InterruptedException
      • consistency

        public void consistency()
        Tests ontology consistency checking.
      • update

        public void update()
        This test checks the statement update mechanism.
      • lookup

        public void lookup()
                    throws java.lang.InterruptedException
        This test checks that concept can be retrieved by their labels.
        Throws:
        java.lang.InterruptedException
      • subSuperClasses

        public void subSuperClasses()
                             throws java.lang.InterruptedException
        This test checks that sub- and superclasses are correctly inferred.
        Throws:
        java.lang.InterruptedException
      • classOf

        public void classOf()
                     throws java.lang.InterruptedException
        This test checks the behaviour of the server when the class of a resource is requested.
        Throws:
        java.lang.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.
      • 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.