Class OpenRobotsOntologyTest

java.lang.Object
laas.openrobots.ontology.tests.OpenRobotsOntologyTest

public class OpenRobotsOntologyTest extends 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.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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 that some facts are correctly asserted/infered in the ontology.
    void
    This test checks the behaviour of the server when the class of a resource is requested.
    void
    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
    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 AlteriteModule
    void
    This tests the find() method when it returns several variables.
    void
    This test retrieve in the ontology details about a resource.
    void
    This test is exactly the same as #testGetInfos() except we don't specify any namespaces.
    void
    BASIC TESTS *
    void
    This test add several new statements and test basic inference mechanisms.
    void
    This test try to create statements with various types of literals.
    void
    This test checks that concept can be retrieved by their labels.
    void
    Performs a simple query on the ontology to check OWL loading and SPARQL query engine both work.
    void
    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
     
    void
     
    void
    This test tests the "safe" add that avoid leading the ontology in a inconsistent state.
    void
     
    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
    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 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

      public void getInfos() throws IllegalStatementException
      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

      public void getInfosDefaultNs() throws IllegalStatementException
      This test is exactly the same as #testGetInfos() except we don't specify any namespaces. It should use the default one.
      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

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

      public void clear() throws InterruptedException
      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

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

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

      public void classOf() throws InterruptedException
      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

      public void alteriteModule1() throws IllegalStatementException
      This test checks that the Alterite module works as expected regarding addition of agents.
      Throws:
      IllegalStatementException
    • alteriteModule2

      public void alteriteModule2() throws IllegalStatementException
      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.