Changeset 1638 for trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeChecker.java
- Timestamp:
- 07/31/14 17:20:07 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-test-utils/src/main/java/de/ugoe/cs/autoquest/tasktrees/TaskTreeChecker.java
r1294 r1638 27 27 28 28 import de.ugoe.cs.autoquest.eventcore.gui.TextInput; 29 import de.ugoe.cs.autoquest.tasktrees.treeifc.DefaultTaskInstanceTraversingVisitor; 29 30 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 30 31 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance; … … 161 162 * 162 163 */ 164 public void assertEventTaskInstancesEqual(ITaskInstanceList expected, 165 ITaskInstanceList checked) 166 { 167 final List<IEventTaskInstance> expectedEventTaskInstances = 168 new ArrayList<IEventTaskInstance>(); 169 170 final List<IEventTaskInstance> checkedEventTaskInstances = 171 new ArrayList<IEventTaskInstance>(); 172 173 for (ITaskInstance instance : expected) { 174 instance.accept(new DefaultTaskInstanceTraversingVisitor() { 175 @Override 176 public void visit(IEventTaskInstance eventTaskInstance) { 177 expectedEventTaskInstances.add(eventTaskInstance); 178 } 179 }); 180 } 181 182 for (ITaskInstance instance : checked) { 183 instance.accept(new DefaultTaskInstanceTraversingVisitor() { 184 @Override 185 public void visit(IEventTaskInstance eventTaskInstance) { 186 checkedEventTaskInstances.add(eventTaskInstance); 187 } 188 }); 189 } 190 191 assertEquals("task instance lists differ in the number of event task instances", 192 expectedEventTaskInstances.size(), checkedEventTaskInstances.size()); 193 194 for (int i = 0; i < expectedEventTaskInstances.size(); i++) { 195 assertTaskInstancesEqual 196 (expectedEventTaskInstances.get(i), checkedEventTaskInstances.get(i)); 197 } 198 } 199 200 /** 201 * 202 */ 163 203 private void assertTaskInstancesEqual(ITaskInstance expected, 164 204 ITaskInstance checked,
Note: See TracChangeset
for help on using the changeset viewer.