Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/nodeequality/EventTaskComparisonRuleTest.java	(revision 1125)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRuleTest.java	(revision 1146)
@@ -13,5 +13,5 @@
 //   limitations under the License.
 
-package de.ugoe.cs.autoquest.tasktrees.nodeequality;
+package de.ugoe.cs.autoquest.tasktrees.taskequality;
 
 import static org.junit.Assert.*;
@@ -22,9 +22,9 @@
 import de.ugoe.cs.autoquest.eventcore.IEventType;
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
-import de.ugoe.cs.autoquest.tasktrees.nodeequality.EventTaskComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.nodeequality.NodeEquality;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNodeFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskTreeNodeFactory;
+import de.ugoe.cs.autoquest.tasktrees.taskequality.EventTaskComparisonRule;
+import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
+import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -39,11 +39,11 @@
     @Test
     public void test_isApplicable_01() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
+        ITaskFactory taskFactory = new TaskFactory();
+
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
 
         assertTrue(rule.isApplicable(task1, task1));
@@ -55,15 +55,15 @@
     @Test
     public void test_isApplicable_02() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
+        ITaskFactory taskFactory = new TaskFactory();
+
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
 
         IEventType eventType2 = new StringEventType("eventType2");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITaskTreeNode task2 = treeNodeFactory.createNewEventTask(eventType2, eventTarget2);
+        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
 
         assertTrue(rule.isApplicable(task1, task2));
@@ -76,13 +76,13 @@
     @Test
     public void test_isApplicable_03() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
+        ITaskFactory taskFactory = new TaskFactory();
+
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
        
-        ITaskTreeNode selection = treeNodeFactory.createNewSelection();
+        ITask selection = taskFactory.createNewSelection();
 
         assertFalse(rule.isApplicable(task1, selection));
@@ -95,13 +95,13 @@
     @Test
     public void test_isApplicable_04() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITaskTreeNode sequence = treeNodeFactory.createNewSequence();
+        ITaskFactory taskFactory = new TaskFactory();
+
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+
+        ITask sequence = taskFactory.createNewSequence();
 
         assertFalse(rule.isApplicable(task1, sequence));
@@ -114,13 +114,13 @@
     @Test
     public void test_isApplicable_05() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITaskTreeNode iteration = treeNodeFactory.createNewIteration();
+        ITaskFactory taskFactory = new TaskFactory();
+
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+
+        ITask iteration = taskFactory.createNewIteration();
 
         assertFalse(rule.isApplicable(task1, iteration));
@@ -133,13 +133,13 @@
     @Test
     public void test_isApplicable_06() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
-
-        ITaskTreeNode optional = treeNodeFactory.createNewOptional();
+        ITaskFactory taskFactory = new TaskFactory();
+
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+
+        ITask optional = taskFactory.createNewOptional();
 
         assertFalse(rule.isApplicable(task1, optional));
@@ -152,13 +152,13 @@
     @Test
     public void test_compare_01() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertEquals(NodeEquality.LEXICALLY_EQUAL, rule.compare(task1, task1));
+        ITaskFactory taskFactory = new TaskFactory();
+        
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        
+        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task1));
         assertTrue(rule.areLexicallyEqual(task1, task1));
         assertTrue(rule.areSyntacticallyEqual(task1, task1));
@@ -171,20 +171,20 @@
     @Test
     public void test_compare_02() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        ITaskTreeNode task2 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertEquals(NodeEquality.LEXICALLY_EQUAL, rule.compare(task1, task2));
+        ITaskFactory taskFactory = new TaskFactory();
+        
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        
+        ITask task2 = taskFactory.createNewEventTask(eventType1, eventTarget1);
+        
+        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, task2));
         assertTrue(rule.areLexicallyEqual(task1, task2));
         assertTrue(rule.areSyntacticallyEqual(task1, task2));
         assertTrue(rule.areSemanticallyEqual(task1, task2));
 
-        assertEquals(NodeEquality.LEXICALLY_EQUAL, rule.compare(task2, task1));
+        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task2, task1));
         assertTrue(rule.areLexicallyEqual(task2, task1));
         assertTrue(rule.areSyntacticallyEqual(task2, task1));
@@ -197,21 +197,21 @@
     @Test
     public void test_compare_03() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
+        ITaskFactory taskFactory = new TaskFactory();
+        
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
-        ITaskTreeNode task2 = treeNodeFactory.createNewEventTask(eventType2, eventTarget1);
-
-        assertEquals(NodeEquality.UNEQUAL, rule.compare(task1, task2));
+        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget1);
+
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
         assertFalse(rule.areLexicallyEqual(task1, task2));
         assertFalse(rule.areSyntacticallyEqual(task1, task2));
         assertFalse(rule.areSemanticallyEqual(task1, task2));
 
-        assertEquals(NodeEquality.UNEQUAL, rule.compare(task2, task1));
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task2, task1));
         assertFalse(rule.areLexicallyEqual(task2, task1));
         assertFalse(rule.areSyntacticallyEqual(task2, task1));
@@ -224,21 +224,21 @@
     @Test
     public void test_compare_04() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
+        ITaskFactory taskFactory = new TaskFactory();
+        
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
         
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITaskTreeNode task2 = treeNodeFactory.createNewEventTask(eventType1, eventTarget2);
-        
-        assertEquals(NodeEquality.UNEQUAL, rule.compare(task1, task2));
+        ITask task2 = taskFactory.createNewEventTask(eventType1, eventTarget2);
+        
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
         assertFalse(rule.areLexicallyEqual(task1, task2));
         assertFalse(rule.areSyntacticallyEqual(task1, task2));
         assertFalse(rule.areSemanticallyEqual(task1, task2));
 
-        assertEquals(NodeEquality.UNEQUAL, rule.compare(task2, task1));
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task2, task1));
         assertFalse(rule.areLexicallyEqual(task2, task1));
         assertFalse(rule.areSyntacticallyEqual(task2, task1));
@@ -252,22 +252,22 @@
     @Test
     public void test_compare_05() {
-        ITaskTreeNodeFactory treeNodeFactory = new TaskTreeNodeFactory();
-        
-        EventTaskComparisonRule rule = new EventTaskComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITaskTreeNode task1 = treeNodeFactory.createNewEventTask(eventType1, eventTarget1);
+        ITaskFactory taskFactory = new TaskFactory();
+        
+        EventTaskComparisonRule rule = new EventTaskComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
         
         IEventType eventType2 = new StringEventType("eventType2");
         IEventTarget eventTarget2 = new DummyGUIElement("elem2");
-        ITaskTreeNode task2 = treeNodeFactory.createNewEventTask(eventType2, eventTarget2);
-        
-        assertEquals(NodeEquality.UNEQUAL, rule.compare(task1, task2));
+        ITask task2 = taskFactory.createNewEventTask(eventType2, eventTarget2);
+        
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task1, task2));
         assertFalse(rule.areLexicallyEqual(task1, task2));
         assertFalse(rule.areSyntacticallyEqual(task1, task2));
         assertFalse(rule.areSemanticallyEqual(task1, task2));
 
-        assertEquals(NodeEquality.UNEQUAL, rule.compare(task2, task1));
+        assertEquals(TaskEquality.UNEQUAL, rule.compare(task2, task1));
         assertFalse(rule.areLexicallyEqual(task2, task1));
         assertFalse(rule.areSyntacticallyEqual(task2, task1));
