Changeset 694 for trunk/quest-core-tasktrees-test
- Timestamp:
- 08/29/12 16:11:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/testutils/TaskTreeChecker.java
r655 r694 14 14 import java.util.regex.Pattern; 15 15 16 import de.ugoe.cs.quest.eventcore.gui.TextInput; 16 17 import de.ugoe.cs.quest.eventcore.guimodel.IGUIElement; 17 18 import de.ugoe.cs.quest.tasktrees.treeifc.IEventTask; … … 22 23 import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTree; 23 24 import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode; 24 import de.ugoe.cs.quest.tasktrees.treeifc.ITextInputEventTask;25 25 26 26 /** … … 129 129 System.err.println(" {\" +"); 130 130 } 131 else if (node instanceof ITextInputEventTask) {132 System.err.print("TextInputEvent textInput");133 System.err.print(typeCounters[3]++);134 System.err.print(" ");135 System.err.print(((ITextInputEventTask) node).getEnteredText());136 System.err.println(" {\" +");137 }138 131 else if (node instanceof IEventTask) { 139 System.err.print("Event "); 140 System.err.print(((IEventTask) node).getEventType().getName()); 132 if (((IEventTask) node).getEventType() instanceof TextInput) { 133 System.err.print("TextInputEvent textInput"); 134 System.err.print(typeCounters[3]++); 135 System.err.print(" \""); 136 System.err.print(((TextInput) ((IEventTask) node).getEventType()).getEnteredText()); 137 System.err.print("\""); 138 } 139 else { 140 System.err.print("Event "); 141 System.err.print(((IEventTask) node).getEventType().getName()); 142 } 141 143 System.err.print(" {}\" +"); 142 144 } … … 149 151 } 150 152 151 if (!(node instanceof IEventTask) || (node instanceof ITextInputEventTask)) {153 if (!(node instanceof IEventTask)) { 152 154 System.err.print(" \""); 153 155 System.err.print(indent); … … 197 199 out.println("{"); 198 200 } 199 else if (node instanceof ITextInputEventTask) {200 out.print("TextInputEvent");201 out.print(" ");202 out.println(((ITextInputEventTask) node).getEnteredText());203 out.print(indent);204 out.println("{");205 }206 201 else if (node instanceof IEventTask) { 207 202 out.print(((IEventTask) node).getEventType().getName()); 208 203 out.print(" "); 204 if (((IEventTask) node).getEventType() instanceof TextInput) { 205 out.print("\""); 206 out.print(((TextInput) ((IEventTask) node).getEventType()).getEnteredText()); 207 out.print("\" "); 208 } 209 209 out.print(((IEventTask) node).getEventTarget()); 210 210 if (((IEventTask) node).getEventTarget() instanceof IGUIElement) … … 222 222 } 223 223 224 if (!(node instanceof IEventTask) || (node instanceof ITextInputEventTask)) {224 if (!(node instanceof IEventTask)) { 225 225 out.print(indent); 226 226 out.print("}"); … … 326 326 327 327 if (("Event".equals(taskSpec.type) && (!(task instanceof IEventTask))) || 328 ("TextInputEvent".equals(taskSpec.type) && (!(task instanceof ITextInputEventTask))) || 328 ("TextInputEvent".equals(taskSpec.type) && 329 (!(task instanceof IEventTask)) && 330 (!(((IEventTask) task).getEventType() instanceof TextInput))) || 329 331 ("Sequence".equals(taskSpec.type) && (!(task instanceof ISequence))) || 330 332 ("Selection".equals(taskSpec.type) && (!(task instanceof ISelection))) || … … 347 349 348 350 if ("TextInputEvent".equals(taskSpec.type)) { 351 TextInput eventType = (TextInput) ((IEventTask) task).getEventType(); 349 352 if (!"".equals(taskSpec.additionalInfo) && 350 !(taskSpec.additionalInfo.equals( ((ITextInputEventTask) task).getEnteredText())))353 !(taskSpec.additionalInfo.equals(eventType.getEnteredText()))) 351 354 { 352 355 if (doTrace) { 353 356 System.err.println("expected text \"" + taskSpec.additionalInfo + 354 357 "\" is not equal to the text " + "provided by the task \"" + 355 ((ITextInputEventTask) task).getEnteredText() + "\"\n");358 eventType.getEnteredText() + "\"\n"); 356 359 } 357 360 return false;
Note: See TracChangeset
for help on using the changeset viewer.