de.fzi.kadmos.api.impl
Class SimpleCorrespondenceTest

java.lang.Object
  extended by de.fzi.kadmos.api.impl.SimpleCorrespondenceTest

public class SimpleCorrespondenceTest
extends Object

Test class for the default implementation of a Correspondence.

Author:
Juergen Bock

Constructor Summary
SimpleCorrespondenceTest()
           
 
Method Summary
static void setUpBeforeClass()
           
static void tearDownAfterClass()
           
 void testClone()
          Test method for SimpleCorrespondence.clone()
 void testDataPropEntityType()
          Test for correspondences of data properties.
 void testEqualsObject()
          Test method for SimpleCorrespondence.equals(java.lang.Object).
 void testGetConfidence()
          Test method for SimpleCorrespondence.getConfidence().
 void testGetEntity1()
          Test method for SimpleCorrespondence.getEntity1().
 void testGetEntity2()
          Test method for SimpleCorrespondence.getEntity2().
 void testHashCode()
          Test method for SimpleCorrespondence.hashCode().
 void testHashLocation()
          Test for the behaviour of correspondences in hash data structures.
 void testIndividualsEntityType()
          Test for correspondences of object properties.
 void testMixedEntityTypes1()
          Test for correspondences entities of mixed types, here: object and data properties No mixed entity type correspondences are allowed, so an IncompatibleEntityTypesException is expected.
 void testMixedEntityTypes2()
          Test for correspondences entities of mixed types, here: class and object properties No mixed entity type correspondences are allowed, so an IncompatibleEntityTypesException is expected.
 void testMixedEntityTypes3()
          Test for correspondences entities of mixed types, here: class and individual No mixed entity type correspondences are allowed, so an IncompatibleEntityTypesException is expected.
 void testMixedEntityTypes4()
          Test for correspondences entities of mixed types, here: data property and individual No mixed entity type correspondences are allowed, so an IncompatibleEntityTypesException is expected.
 void testObjPropEntityType()
          Test for correspondences of object properties.
 void testRoundTripSerialisation()
          Test method for SimpleCorrespondence.writeObject(java.io.ObjectOutputStream) and SimpleCorrespondence.readObject(java.io.ObjectInputStream).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCorrespondenceTest

public SimpleCorrespondenceTest()
Method Detail

setUpBeforeClass

public static void setUpBeforeClass()
                             throws Exception
Throws:
Exception

tearDownAfterClass

public static void tearDownAfterClass()
                               throws Exception
Throws:
Exception

testHashCode

public final void testHashCode()
                        throws Exception
Test method for SimpleCorrespondence.hashCode().

Throws:
Exception

testGetConfidence

public final void testGetConfidence()
                             throws Exception
Test method for SimpleCorrespondence.getConfidence().

Throws:
Exception

testGetEntity1

public final void testGetEntity1()
                          throws Exception
Test method for SimpleCorrespondence.getEntity1().

Throws:
Exception

testGetEntity2

public final void testGetEntity2()
                          throws Exception
Test method for SimpleCorrespondence.getEntity2().

Throws:
Exception

testObjPropEntityType

public final void testObjPropEntityType()
                                 throws Exception
Test for correspondences of object properties.

Throws:
Exception

testDataPropEntityType

public final void testDataPropEntityType()
                                  throws Exception
Test for correspondences of data properties.

Throws:
Exception

testIndividualsEntityType

public final void testIndividualsEntityType()
                                     throws Exception
Test for correspondences of object properties.

Throws:
Exception

testMixedEntityTypes1

public final void testMixedEntityTypes1()
                                 throws Exception
Test for correspondences entities of mixed types, here: object and data properties No mixed entity type correspondences are allowed, so an IncompatibleEntityTypesException is expected.

Throws:
Exception

testMixedEntityTypes2

public final void testMixedEntityTypes2()
                                 throws Exception
Test for correspondences entities of mixed types, here: class and object properties No mixed entity type correspondences are allowed, so an IncompatibleEntityTypesException is expected.

Throws:
Exception

testMixedEntityTypes3

public final void testMixedEntityTypes3()
                                 throws Exception
Test for correspondences entities of mixed types, here: class and individual No mixed entity type correspondences are allowed, so an IncompatibleEntityTypesException is expected.

Throws:
Exception

testMixedEntityTypes4

public final void testMixedEntityTypes4()
                                 throws Exception
Test for correspondences entities of mixed types, here: data property and individual No mixed entity type correspondences are allowed, so an IncompatibleEntityTypesException is expected.

Throws:
Exception

testEqualsObject

public final void testEqualsObject()
                            throws Exception
Test method for SimpleCorrespondence.equals(java.lang.Object).

Throws:
Exception

testClone

public final void testClone()
                     throws Exception
Test method for SimpleCorrespondence.clone()

Throws:
Exception

testHashLocation

public final void testHashLocation()
                            throws Exception
Test for the behaviour of correspondences in hash data structures. Two correspondences for the same entities are created, but with different confidences. The two correspondences are different object instances. They are not equal. Adding them to a HashSet works as expected: both are contained in the set. Removing one preserves the other one in the set. Changing the confidence for the one remaining in the set works as expected: The reference obtained from the set refers to the correct one with the modified confidence. If a correspondence between the same entities but with different confidence is added to the set, it is added correctly. If a correspondence that is equal to one already contained in the set, but is a different instance, it cannot be added to the set correctly. Beware: Checking whether a hash data set contains a correspondence that is equal to a correspondence that is actually contained, but is a different object instance, returns true.

Throws:
Exception

testRoundTripSerialisation

public final void testRoundTripSerialisation()
                                      throws Exception
Test method for SimpleCorrespondence.writeObject(java.io.ObjectOutputStream) and SimpleCorrespondence.readObject(java.io.ObjectInputStream).

Throws:
Exception


Copyright © 2012. All Rights Reserved.