Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRuleTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRuleTest.java	(revision 1190)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRuleTest.java	(revision 1294)
@@ -23,12 +23,7 @@
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskAndIterationComparisonRule;
-import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 import de.ugoe.cs.autoquest.test.DummyGUIElement;
 
@@ -36,38 +31,258 @@
  * @author Patrick Harms
  */
-public class TaskAndIterationComparisonRuleTest {
-
-    /**
-     *
-     */
-    @Test
-    public void test() {
-        ITaskFactory taskFactory = new TaskFactory();
-        ITaskBuilder treeBuilder = new TaskBuilder();
-        
-        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
-        
-        IEventType eventType1 = new StringEventType("eventType1");
-        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
-        ITask task1 = taskFactory.createNewEventTask(eventType1, eventTarget1);
-        
-        assertNull(rule.compare(task1, task1));
-        
-        IIteration iteration1 = taskFactory.createNewIteration();
-        assertNull(rule.compare(iteration1, iteration1));
-        assertNull(rule.compare(task1, iteration1));
-        assertNull(rule.compare(iteration1, task1));
-
-        treeBuilder.setMarkedTask(iteration1, task1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, iteration1));
-        
-        ISelection selection1 = taskFactory.createNewSelection();
-        treeBuilder.addChild(selection1, task1);
-        treeBuilder.setMarkedTask(iteration1, selection1);
-        
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(iteration1, task1));
-        assertEquals(TaskEquality.LEXICALLY_EQUAL, rule.compare(task1, iteration1));
+public class TaskAndIterationComparisonRuleTest extends AbstractComparisonRuleTest {
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_01() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewSequence();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_02() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_03() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewIteration();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_04() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        ITask task1 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_05() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_06() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSequence();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_07() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewSelection();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_08() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        ITask task2 = createNewOptional();
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_09() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewIteration();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertTrue(rule.isApplicable(task1, task2));
+        assertTrue(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_10() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewSelection();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_11() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSequence();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_12() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSequence();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_13() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSelection();
+        ITask task2 = createNewOptional();
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_isApplicable_14() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+
+        ITask task1 = createNewSelection();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+
+        ITask task2 = createNewEventTask(eventType1, eventTarget1);
+        
+        assertFalse(rule.isApplicable(task1, task2));
+        assertFalse(rule.isApplicable(task2, task1));
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_01() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        
+        assertNullEquality(rule, iteration1, task1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_02() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        setMarkedTask(iteration1, task1);
+        
+        assertLexicallyEqual(rule, task1, iteration1);
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void test_compare_03() {
+        TaskAndIterationComparisonRule rule = new TaskAndIterationComparisonRule();
+        
+        IEventType eventType1 = new StringEventType("eventType1");
+        IEventTarget eventTarget1 = new DummyGUIElement("elem1");
+        ITask task1 = createNewEventTask(eventType1, eventTarget1);
+        
+        IIteration iteration1 = createNewIteration();
+        
+        ISelection selection1 = createNewSelection();
+        addChild(selection1, task1);
+        setMarkedTask(iteration1, selection1);
+        
+        assertLexicallyEqual(rule, task1, iteration1);
     }
 
