Changeset 1205 for trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsPatternTest.java
- Timestamp:
- 05/01/13 14:33:31 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsPatternTest.java
r1170 r1205 24 24 25 25 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 26 import de.ugoe.cs.autoquest.usability.rules.patterns. UsagePattern;27 import de.ugoe.cs.autoquest.usability.rules.patterns. UsagePatternBuilder;26 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 27 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 28 28 import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 29 29 … … 44 44 " TextInput t1 {}" + 45 45 " Selection sel1 {" + 46 " Sequence seq 1{" +46 " Sequence seq2 {" + 47 47 " MouseClick t2 {}" + 48 48 " }" + 49 49 " }" + 50 50 " Selection sel1 {" + 51 " Sequence seq1 {" + 52 " TextInput t3 {}" + 51 " Sequence seq3 {" + 52 " EventTask t3 {}" + 53 " MouseClick t5 {}" + 53 54 " }" + 54 55 " }" + … … 56 57 "}"; 57 58 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 58 UsagePatternBuilder builder = new UsagePatternBuilder();59 UsagePattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).build();60 UsagePattern pattern = builder.concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).build();59 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 60 InteractionPattern endsWithPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).build(); 61 InteractionPattern pattern = builder.concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build(); 61 62 // When 62 63 boolean patternContained = pattern.containedIn(taskTree); … … 92 93 "}"; 93 94 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 94 UsagePatternBuilder builder = new UsagePatternBuilder();95 UsagePattern containedPattern = builder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();96 UsagePattern pattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).contains(containedPattern).build();95 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 96 InteractionPattern endsWithPattern = builder.concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 97 InteractionPattern pattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(endsWithPattern).build(); 97 98 // When 98 99 boolean patternContained = pattern.containedIn(taskTree);
Note: See TracChangeset
for help on using the changeset viewer.