de.fzi.kadmos.evaluator.impl
Class SymProxEvaluatorTest

java.lang.Object
  extended by de.fzi.kadmos.evaluator.impl.SymProxEvaluatorTest

public class SymProxEvaluatorTest
extends Object

Test class for the symmetric proximity precision / recall evaluator SymProxEvaluatorImpl.

Author:
Matthias Stumpp

Constructor Summary
SymProxEvaluatorTest()
           
 
Method Summary
static void setUpBeforeClass()
           
 void testGetFMeasureAllWrong()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testGetFMeasureContainsHalf()
          Test for SymProxEvaluator.getRecall(Alignment).
 void testGetFMeasureEmptyAlignment()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testGetFMeasureEmptyReferenceAlignment()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testGetFMeasureEqualAlignmentAndReference()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testGetFMeasureIncompatibleOntology1()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testGetFMeasureIncompatibleOntology2()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testGetFMeasureNullReference()
          If a null reference is given as parameter for the SymProxEvaluatorImpl.getFMeasure(Alignment) method, an IllegalArgumentException is expected.
 void testGetPrecisionAllCorrectButIncomplete()
          Test for SymProxEvaluator.getPrecision(Alignment).
 void testGetPrecisionEmptyAlignment()
          Test for SymProxEvaluator.getPrecision(Alignment).
 void testGetPrecisionEmptyReferenceAlignment()
          Test for PrecRecEvaluator.getPrecision(Alignment).
 void testGetPrecisionEqualAlignmentAndReference()
          Test for SymProxEvaluator.getPrecision(Alignment).
 void testGetPrecisionIncompatibleOntology1()
          Test for SymProxEvaluator.getPrecision(Alignment).
 void testGetPrecisionIncompatibleOntology2()
          Test for SymProxEvaluator.getPrecision(Alignment).
 void testGetPrecisionNullReference()
          If a null reference is given as parameter for the SymProxEvaluatorImpl.getPrecision(Alignment) method, an IllegalArgumentException is expected.
 void testGetPrecisionOneOfTwoCorrect()
          Test for SymProxEvaluator.getPrecision(Alignment).
 void testGetPrecisionTwoOfFourCorrect()
          Test for SymProxEvaluator.getPrecision(Alignment).
 void testGetRecallContainsAllButMore()
          Test for SymProxEvaluator.getRecall(Alignment).
 void testGetRecallEmptyAlignment()
          Test for SymProxEvaluator.getRecall(Alignment).
 void testGetRecallEmptyReferenceAlignment()
          Test for SymProxEvaluator.getRecall(Alignment).
 void testGetRecallEqualAlignmentAndReference()
          Test for SymProxEvaluator.getRecall(Alignment).
 void testGetRecallFourOfEightContained()
          Test for SymProxEvaluator.getRecall(Alignment).
 void testGetRecallIncompatibleOntology1()
          Test for SymProxEvaluator.getRecall(Alignment).
 void testGetRecallIncompatibleOntology2()
          Test for SymProxEvaluator.getRecall(Alignment).
 void testGetRecallNullReference()
          If a null reference is given as parameter for the SymProxEvaluatorImpl.getRecall(Alignment) method, an IllegalArgumentException is expected.
 void testGetRecallOneOfTwoContained()
          Test for SymProxEvaluator.getRecall(Alignment).
 void testInitNullReference()
          If a null reference is given as parameter for the SymProxEvaluatorImpl.getInstance(Alignment) method, an IllegalArgumentException is expected.
 void testInstanceCaching()
          If two instances are requested using the same reference Alignment, the same SymProxEvaluatorImpl instance is provided.
 void testOWLClassDifferentHierarchy()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testOWLClassSameHierarchy()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testOWLDataPropertyDifferentHierarchy()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testOWLDataPropertySameHierarchy()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testOWLObjectPropertyDifferentHierarchy()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 void testOWLObjectPropertySameHierarchy()
          Test for SymProxEvaluator.getFMeasure(Alignment).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymProxEvaluatorTest

public SymProxEvaluatorTest()
Method Detail

setUpBeforeClass

public static void setUpBeforeClass()
                             throws Exception
Throws:
Exception

testInitNullReference

public final void testInitNullReference()
                                 throws Exception
If a null reference is given as parameter for the SymProxEvaluatorImpl.getInstance(Alignment) method, an IllegalArgumentException is expected.

Throws:
Exception

testGetPrecisionNullReference

public final void testGetPrecisionNullReference()
                                         throws Exception
If a null reference is given as parameter for the SymProxEvaluatorImpl.getPrecision(Alignment) method, an IllegalArgumentException is expected.

Throws:
Exception

testGetRecallNullReference

public final void testGetRecallNullReference()
                                      throws Exception
If a null reference is given as parameter for the SymProxEvaluatorImpl.getRecall(Alignment) method, an IllegalArgumentException is expected.

Throws:
Exception

testGetFMeasureNullReference

public final void testGetFMeasureNullReference()
                                        throws Exception
If a null reference is given as parameter for the SymProxEvaluatorImpl.getFMeasure(Alignment) method, an IllegalArgumentException is expected.

Throws:
Exception

testInstanceCaching

public final void testInstanceCaching()
                               throws Exception
If two instances are requested using the same reference Alignment, the same SymProxEvaluatorImpl instance is provided. If different reference Alignments are used, different instances are provided.

Throws:
Exception

testGetPrecisionEmptyAlignment

public final void testGetPrecisionEmptyAlignment()
                                          throws Exception
Test for SymProxEvaluator.getPrecision(Alignment). Empty alignment, non-empty reference alignment. Expected: NaN

Throws:
Exception

testGetPrecisionEmptyReferenceAlignment

public final void testGetPrecisionEmptyReferenceAlignment()
                                                   throws Exception
Test for PrecRecEvaluator.getPrecision(Alignment). Non-empty alignment, empty reference alignment. Expected: 0.0

Throws:
Exception

testGetPrecisionEqualAlignmentAndReference

public final void testGetPrecisionEqualAlignmentAndReference()
                                                      throws Exception
Test for SymProxEvaluator.getPrecision(Alignment). Equal alignment and reference alignment. Expected: 1.0

Throws:
Exception

testGetPrecisionAllCorrectButIncomplete

public final void testGetPrecisionAllCorrectButIncomplete()
                                                   throws Exception
Test for SymProxEvaluator.getPrecision(Alignment). All correct, but reference contains more. Expected: 1.0

Throws:
Exception

testGetPrecisionOneOfTwoCorrect

public final void testGetPrecisionOneOfTwoCorrect()
                                           throws Exception
Test for SymProxEvaluator.getPrecision(Alignment). 1 of 2 correct. Expected: 0.5

Throws:
Exception

testGetPrecisionTwoOfFourCorrect

public final void testGetPrecisionTwoOfFourCorrect()
                                            throws Exception
Test for SymProxEvaluator.getPrecision(Alignment). 2 of 4 correct. Expected: 0.5

Throws:
Exception

testGetPrecisionIncompatibleOntology1

public final void testGetPrecisionIncompatibleOntology1()
                                                 throws Exception
Test for SymProxEvaluator.getPrecision(Alignment). Different ontology 1 in alignment reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testGetPrecisionIncompatibleOntology2

public final void testGetPrecisionIncompatibleOntology2()
                                                 throws Exception
Test for SymProxEvaluator.getPrecision(Alignment). Different ontology 2 in alignment and reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testGetRecallEmptyAlignment

public final void testGetRecallEmptyAlignment()
                                       throws Exception
Test for SymProxEvaluator.getRecall(Alignment). Empty alignment, non-empty reference alignment. Expected: 0.0

Throws:
Exception

testGetRecallEmptyReferenceAlignment

public final void testGetRecallEmptyReferenceAlignment()
                                                throws Exception
Test for SymProxEvaluator.getRecall(Alignment). Non-empty alignment, empty reference alignment. Expected: NaN

Throws:
Exception

testGetRecallEqualAlignmentAndReference

public final void testGetRecallEqualAlignmentAndReference()
                                                   throws Exception
Test for SymProxEvaluator.getRecall(Alignment). Equal alignment and reference alignment. Expected: 1.0

Throws:
Exception

testGetRecallContainsAllButMore

public final void testGetRecallContainsAllButMore()
                                           throws Exception
Test for SymProxEvaluator.getRecall(Alignment). Contains all from reference, but also some more. Expected: 1.0

Throws:
Exception

testGetRecallOneOfTwoContained

public final void testGetRecallOneOfTwoContained()
                                          throws Exception
Test for SymProxEvaluator.getRecall(Alignment). 1 of 2 contained. Expected: 0.5

Throws:
Exception

testGetRecallFourOfEightContained

public final void testGetRecallFourOfEightContained()
                                             throws Exception
Test for SymProxEvaluator.getRecall(Alignment). 4 of 8 contained. Expected: 0.5

Throws:
Exception

testGetRecallIncompatibleOntology1

public final void testGetRecallIncompatibleOntology1()
                                              throws Exception
Test for SymProxEvaluator.getRecall(Alignment). Different ontology 1 in alignment reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testGetRecallIncompatibleOntology2

public final void testGetRecallIncompatibleOntology2()
                                              throws Exception
Test for SymProxEvaluator.getRecall(Alignment). Different ontology 2 in alignment and reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testGetFMeasureEmptyAlignment

public final void testGetFMeasureEmptyAlignment()
                                         throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Empty alignment, non-empty reference alignment. Expected: NaN

Throws:
Exception

testGetFMeasureEmptyReferenceAlignment

public final void testGetFMeasureEmptyReferenceAlignment()
                                                  throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Non-empty alignment, empty reference alignment. Expected: NaN

Throws:
Exception

testGetFMeasureEqualAlignmentAndReference

public final void testGetFMeasureEqualAlignmentAndReference()
                                                     throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Equal alignment and reference alignment. Expected: 1.0

Throws:
Exception

testGetFMeasureContainsHalf

public final void testGetFMeasureContainsHalf()
                                       throws Exception
Test for SymProxEvaluator.getRecall(Alignment). Contains half of the correspondences from reference. Expected: precision=0.5, recall=1.0, f-measure=2/3

Throws:
Exception

testGetFMeasureAllWrong

public final void testGetFMeasureAllWrong()
                                   throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). All wrong. Expected: 0.0

Throws:
Exception

testGetFMeasureIncompatibleOntology1

public final void testGetFMeasureIncompatibleOntology1()
                                                throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Different ontology 1 in alignment reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testGetFMeasureIncompatibleOntology2

public final void testGetFMeasureIncompatibleOntology2()
                                                throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Different ontology 2 in alignment and reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testOWLClassSameHierarchy

public final void testOWLClassSameHierarchy()
                                     throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Different ontology 2 in alignment and reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testOWLClassDifferentHierarchy

public final void testOWLClassDifferentHierarchy()
                                          throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Different ontology 2 in alignment and reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testOWLObjectPropertySameHierarchy

public final void testOWLObjectPropertySameHierarchy()
                                              throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Different ontology 2 in alignment and reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testOWLObjectPropertyDifferentHierarchy

public final void testOWLObjectPropertyDifferentHierarchy()
                                                   throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Different ontology 2 in alignment and reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testOWLDataPropertySameHierarchy

public final void testOWLDataPropertySameHierarchy()
                                            throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Different ontology 2 in alignment and reference. Expected: IncompatibleAlignmentsException

Throws:
Exception

testOWLDataPropertyDifferentHierarchy

public final void testOWLDataPropertyDifferentHierarchy()
                                                 throws Exception
Test for SymProxEvaluator.getFMeasure(Alignment). Different ontology 2 in alignment and reference. Expected: IncompatibleAlignmentsException

Throws:
Exception


Copyright © 2012. All Rights Reserved.