edu.stanford.smi.protegex.owl.ui.conditions.tests
Class SetConditionTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byedu.stanford.smi.protegex.owl.tests.AbstractOWLTestCase
              extended byedu.stanford.smi.protegex.owl.tests.AbstractJenaTestCase
                  extended byedu.stanford.smi.protegex.owl.ui.conditions.tests.AbstractConditionsTableTestCase
                      extended byedu.stanford.smi.protegex.owl.ui.conditions.tests.SetConditionTestCase
All Implemented Interfaces:
ConditionsTableConstants, junit.framework.Test

public class SetConditionTestCase
extends AbstractConditionsTableTestCase

Author:
Holger Knublauch

Field Summary
 
Fields inherited from class edu.stanford.smi.protegex.owl.ui.conditions.tests.AbstractConditionsTableTestCase
events, INHERITED, NECESSARY, SUFFICIENT
 
Fields inherited from class edu.stanford.smi.protegex.owl.tests.AbstractJenaTestCase
ontModel, owlFullModel
 
Fields inherited from class edu.stanford.smi.protegex.owl.tests.AbstractOWLTestCase
owlModel, owlThing, project
 
Fields inherited from class junit.framework.TestCase
 
Fields inherited from interface edu.stanford.smi.protegex.owl.ui.conditions.ConditionsTableConstants
COL_COUNT, COL_EXPRESSION, TYPE_DEFINITION_BASE, TYPE_INHERITED, TYPE_SUPERCLASS
 
Constructor Summary
SetConditionTestCase()
           
 
Method Summary
 void testReplaceAnonSuperclassWithRestriction()
           Animal !
 void testReplaceLastNamedSuperclassWithAnonCls()
           Animal -> set to "!
 void testReplaceNamedSuperclassWithRestriction()
           Animal owl:Thing -> set to "children >= 1" !
 void testSetAnonEquivalentClsOperandToOtherAnon()
           Animal !
 void testSetAnonEquivalentClsToNamed()
           !
 void testSetAnonEquivalentClsToOtherAnon()
           !
 void testSetNamedEquivalentClsOperandToAnon()
           Animal -> set to "!
 void testSetNamedEquivalentClsOperandToOtherNamed()
           Animal -> set to "Tier" !
 void testSetNamedEquivalentClsToAnon()
           Mensch -> set to "!
 void testSetToItself()
           
 void testSetUnchanged()
           children >= 1 -> reassign unchanged owl:Thing -------------------------------------- Nothing should happen
 
Methods inherited from class edu.stanford.smi.protegex.owl.ui.conditions.tests.AbstractConditionsTableTestCase
assertTableModelStructure, getEvent, getTableModel
 
Methods inherited from class edu.stanford.smi.protegex.owl.tests.AbstractJenaTestCase
getNamedClassesCount, loadRemoteOntology, loadRemoteOntologyWithProtegeMetadataOntology, loadTestOntology, ontResourceExists, reload, reloadWithJenaLoader
 
Methods inherited from class edu.stanford.smi.protegex.owl.tests.AbstractOWLTestCase
assertContains, assertContains, assertContainsNot, assertHasValue, assertSize, assertSize, dumpRDF, getRemoteOntologyURI, getTestOntologyURI, hasTypedLiteral, list, setUp
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetConditionTestCase

public SetConditionTestCase()
Method Detail

testReplaceLastNamedSuperclassWithAnonCls

public void testReplaceLastNamedSuperclassWithAnonCls()
                                               throws Exception
Animal -> set to "!Animal" -------------------------------------------- owl:Thing Person (!Animal) Animal

Throws:
Exception

testReplaceAnonSuperclassWithRestriction

public void testReplaceAnonSuperclassWithRestriction()
                                              throws Exception
Animal !Animal -> set to "children >= 1" -------------------------------------------- owl:Thing Animal Person (children >= 1)

Throws:
Exception

testReplaceNamedSuperclassWithRestriction

public void testReplaceNamedSuperclassWithRestriction()
                                               throws Exception
Animal owl:Thing -> set to "children >= 1" !Animal -------------------------------------------- owl:Thing Animal Person (children >= 1 , !Animal)

Throws:
Exception

testSetNamedEquivalentClsToAnon

public void testSetNamedEquivalentClsToAnon()
                                     throws Exception
Mensch -> set to "!Mensch" ------------------------------------------------------ owl:Thing Person = !Mensch Mensch

Throws:
Exception

testSetAnonEquivalentClsToNamed

public void testSetAnonEquivalentClsToNamed()
                                     throws Exception
!Mensch -> set to "Mensch" owl:Thing ------------------------------------------------------ owl:Thing Person = Mensch Mensch = Person

Throws:
Exception

testSetAnonEquivalentClsToOtherAnon

public void testSetAnonEquivalentClsToOtherAnon()
                                         throws Exception
!Mensch -> set to "!Animal" Animal ------------------------------------------------------ owl:Thing Animal Person = !Animal

Throws:
Exception

testSetAnonEquivalentClsOperandToOtherAnon

public void testSetAnonEquivalentClsOperandToOtherAnon()
                                                throws Exception
Animal !Tier -> set to "!Animal" ------------------------------------------------------ owl:Thing Animal Person = Animal & !Animal

Throws:
Exception

testSetNamedEquivalentClsOperandToAnon

public void testSetNamedEquivalentClsOperandToAnon()
                                            throws Exception
Animal -> set to "!Animal" !Tier ------------------------------------------------------ owl:Thing Person = !Animal & !Tier

Throws:
Exception

testSetNamedEquivalentClsOperandToOtherNamed

public void testSetNamedEquivalentClsOperandToOtherNamed()
                                                  throws Exception
Animal -> set to "Tier" !Tier ------------------------------------------------------ owl:Thing Tier Person = Tier & !Tier

Throws:
Exception

testSetUnchanged

public void testSetUnchanged()
                      throws Exception
children >= 1 -> reassign unchanged owl:Thing -------------------------------------- Nothing should happen

Throws:
Exception

testSetToItself

public void testSetToItself()
                     throws Exception
Throws:
Exception