Changeset 1218 for trunk/autoquest-core-usability-evaluation-test/src/main
- Timestamp:
- 06/06/13 17:09:49 (12 years ago)
- Location:
- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability
- Files:
-
- 1 added
- 1 deleted
- 29 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/AllTests.java
r1151 r1218 22 22 import de.ugoe.cs.autoquest.usability.rules.metrics.TextInputEntryRepetitionsEvaluatorTest; 23 23 import de.ugoe.cs.autoquest.usability.rules.metrics.TextInputRatioEvaluatorTest; 24 import de.ugoe.cs.autoquest.usability.rules.patterns.LongFormUsage DefectTest;24 import de.ugoe.cs.autoquest.usability.rules.patterns.LongFormUsageProblemTest; 25 25 import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains.ContainsAndEndsWithEventTest; 26 26 import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains.ContainsEventTest; … … 75 75 // P -> E 76 76 // P -> P 77 LongFormUsage DefectTest.class77 LongFormUsageProblemTest.class 78 78 } 79 79 ) -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/NoLetterOrDigitTextInputsEvaluatorTest.java
r1201 r1218 28 28 29 29 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 30 import de.ugoe.cs.autoquest.usability.result.Usability Defect;30 import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription; 31 31 import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 32 32 … … 50 50 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 51 51 // When 52 Optional<Usability Defect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate();52 Optional<UsabilityProblemDescription> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 53 53 // Then 54 54 assertThat(recommendation).is(absent()); … … 66 66 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 67 67 // When 68 Optional<Usability Defect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate();68 Optional<UsabilityProblemDescription> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 69 69 // Then 70 70 assertThat(recommendation).is(present()).has(infoRecommendationSeverityLevel()); … … 81 81 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 82 82 // When 83 Optional<Usability Defect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate();83 Optional<UsabilityProblemDescription> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 84 84 // Then 85 85 assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel()); … … 96 96 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 97 97 // When 98 Optional<Usability Defect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate();98 Optional<UsabilityProblemDescription> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 99 99 // Then 100 100 assertThat(recommendation).is(present()).has(mediumRecommendationSeverityLevel()); … … 111 111 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 112 112 // When 113 Optional<Usability Defect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate();113 Optional<UsabilityProblemDescription> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 114 114 // Then 115 115 assertThat(recommendation).is(present()).has(highRecommendationSeverityLevel()); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputEntryRepetitionsEvaluatorTest.java
r1201 r1218 28 28 29 29 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 30 import de.ugoe.cs.autoquest.usability.result.Usability Defect;30 import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription; 31 31 import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 32 32 … … 50 50 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 51 51 // When 52 Optional<Usability Defect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate();52 Optional<UsabilityProblemDescription> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 53 53 // Then 54 54 assertThat(recommendation).is(absent()); … … 70 70 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 71 71 // When 72 Optional<Usability Defect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate();72 Optional<UsabilityProblemDescription> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 73 73 // Then 74 74 assertThat(recommendation).is(present()).has(infoRecommendationSeverityLevel()); … … 90 90 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 91 91 // When 92 Optional<Usability Defect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate();92 Optional<UsabilityProblemDescription> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 93 93 // Then 94 94 assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel()); … … 137 137 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 138 138 // When 139 Optional<Usability Defect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate();139 Optional<UsabilityProblemDescription> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 140 140 // Then 141 141 assertThat(recommendation).is(present()).has(mediumRecommendationSeverityLevel()); … … 184 184 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 185 185 // When 186 Optional<Usability Defect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate();186 Optional<UsabilityProblemDescription> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 187 187 // Then 188 188 assertThat(recommendation).is(present()).has(highRecommendationSeverityLevel()); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputRatioEvaluatorTest.java
r1201 r1218 28 28 29 29 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 30 import de.ugoe.cs.autoquest.usability.result.Usability Defect;30 import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription; 31 31 import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 32 32 … … 57 57 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 58 58 // When 59 Optional<Usability Defect> recommendation = new TextInputRatioMetric(taskTree).calculate();59 Optional<UsabilityProblemDescription> recommendation = new TextInputRatioMetric(taskTree).calculate(); 60 60 // Then 61 61 assertThat(recommendation).is(absent()); … … 76 76 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 77 77 // When 78 Optional<Usability Defect> recommendation = new TextInputRatioMetric(taskTree).calculate();78 Optional<UsabilityProblemDescription> recommendation = new TextInputRatioMetric(taskTree).calculate(); 79 79 // Then 80 80 assertThat(recommendation).is(present()).has(infoRecommendationSeverityLevel()); … … 95 95 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 96 96 // When 97 Optional<Usability Defect> recommendation = new TextInputRatioMetric(taskTree).calculate();97 Optional<UsabilityProblemDescription> recommendation = new TextInputRatioMetric(taskTree).calculate(); 98 98 // Then 99 99 assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel()); … … 113 113 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 114 114 // When 115 Optional<Usability Defect> recommendation = new TextInputRatioMetric(taskTree).calculate();115 Optional<UsabilityProblemDescription> recommendation = new TextInputRatioMetric(taskTree).calculate(); 116 116 // Then 117 117 assertThat(recommendation).is(present()).has(mediumRecommendationSeverityLevel()); … … 126 126 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 127 127 // When 128 Optional<Usability Defect> recommendation = new TextInputRatioMetric(taskTree).calculate();128 Optional<UsabilityProblemDescription> recommendation = new TextInputRatioMetric(taskTree).calculate(); 129 129 // Then 130 130 assertThat(recommendation).is(present()).has(highRecommendationSeverityLevel()); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageProblemTest.java
r1216 r1218 24 24 25 25 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 26 import de.ugoe.cs.autoquest.usability.result.Usability Defect;26 import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription; 27 27 import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 28 28 … … 34 34 * @author Alexander Deicke 35 35 */ 36 public class LongFormUsage DefectTest {36 public class LongFormUsageProblemTest { 37 37 38 38 @Test … … 53 53 ITaskModel taskModel = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 54 54 // When 55 Optional<Usability Defect> recommendation = new LongFormUsageDefect(taskModel).check();55 Optional<UsabilityProblemDescription> recommendation = new LongFormUsageProblem(taskModel).check(); 56 56 // Then 57 57 assertThat(recommendation).is(present()); … … 71 71 ITaskModel taskModel = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 72 72 // When 73 Optional<Usability Defect> recommendation = new LongFormUsageDefect(taskModel).check();73 Optional<UsabilityProblemDescription> recommendation = new LongFormUsageProblem(taskModel).check(); 74 74 // Then 75 75 assertThat(recommendation).is(absent()); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsAndEndsWithEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 46 46 "}"; 47 47 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 48 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).contains(TEXT_INPUT).endsWith(TEXT_INPUT).build();48 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).containsEvent(TEXT_INPUT).endsWithEvent(TEXT_INPUT).patternFinished().build(); 49 49 // When 50 50 boolean patternContained = pattern.containedIn(taskTree); … … 66 66 "}"; 67 67 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 68 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).endsWith(MOUSE_CLICK).build();68 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).containsEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 69 69 // When 70 70 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 20 20 import static org.fest.assertions.api.Assertions.assertThat; 21 21 … … 45 45 "}"; 46 46 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 47 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).contains(TEXT_INPUT).build();47 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).containsEvent(TEXT_INPUT).patternFinished().build(); 48 48 // When 49 49 boolean patternContained = pattern.containedIn(taskTree); … … 64 64 "}"; 65 65 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 66 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).build();66 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).containsEvent(TEXT_INPUT).patternFinished().build(); 67 67 // When 68 68 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 20 20 import static org.fest.assertions.api.Assertions.assertThat; 21 21 … … 50 50 "}"; 51 51 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 52 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 53 InteractionPattern containsPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(TEXT_INPUT).build(); 54 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).contains(containsPattern).build(); 52 InteractionPattern containsPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(TEXT_INPUT).patternFinished().build(); 53 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).containsPattern(containsPattern).patternFinished().build(); 55 54 // When 56 55 boolean patternContained = pattern.containedIn(taskTree); … … 79 78 "}"; 80 79 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 81 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).build();80 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).containsEvent(TEXT_INPUT).patternFinished().build(); 82 81 // When 83 82 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.endswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 19 19 import static org.fest.assertions.api.Assertions.assertThat; 20 20 … … 52 52 "}"; 53 53 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 54 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).endsWith(TEXT_INPUT).build();54 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).endsWithEvent(TEXT_INPUT).patternFinished().build(); 55 55 // When 56 56 boolean patternContained = pattern.containedIn(taskTree); … … 83 83 "}"; 84 84 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 85 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).endsWith(TEXT_INPUT).build();85 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).endsWithEvent(TEXT_INPUT).patternFinished().build(); 86 86 // When 87 87 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.endswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;21 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 21 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 22 22 import static org.fest.assertions.api.Assertions.assertThat; 23 23 … … 60 60 "}"; 61 61 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 62 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 63 InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 64 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).endsWith(endsWithPattern).build(); 62 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 63 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).endsWithPattern(endsWithPattern).patternFinished().build(); 65 64 // When 66 65 boolean patternContained = pattern.containedIn(taskTree); … … 98 97 "}"; 99 98 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 100 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 101 InteractionPattern endsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).contains(TEXT_INPUT).build(); 102 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).endsWith(endsWithPattern).build(); 99 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).containsEvent(TEXT_INPUT).patternFinished().build(); 100 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).endsWithPattern(endsWithPattern).patternFinished().build(); 103 101 // When 104 102 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventAndContainsEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 20 20 import static org.fest.assertions.api.Assertions.assertThat; 21 21 … … 52 52 "}"; 53 53 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 54 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build();54 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 55 55 // When 56 56 boolean patternContained = pattern.containedIn(taskTree); … … 83 83 "}"; 84 84 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 85 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build();85 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 86 86 // When 87 87 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 52 52 "}"; 53 53 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 54 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();54 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 55 55 // When 56 56 boolean patternContained = pattern.containedIn(taskTree); … … 76 76 "}"; 77 77 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 78 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(ITERATION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();78 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 79 79 // When 80 80 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternAndContainsPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 55 55 "}"; 56 56 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 57 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 58 InteractionPattern startsWithPattern = builder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 59 InteractionPattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 60 InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).contains(TEXT_INPUT).build(); 61 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).endsWith(endsWithPattern).build(); 57 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build(); 58 InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 59 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(TEXT_INPUT).patternFinished().build(); 60 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containedPattern).endsWithPattern(endsWithPattern).patternFinished().build(); 62 61 // When 63 62 boolean patternContained = pattern.containedIn(taskTree); … … 84 83 "}"; 85 84 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 86 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 87 InteractionPattern startsWithPattern = builder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 88 InteractionPattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 89 InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).contains(TEXT_INPUT).build(); 90 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).endsWith(endsWithPattern).build(); 85 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build(); 86 InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 87 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(TEXT_INPUT).patternFinished().build(); 88 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containedPattern).endsWithPattern(endsWithPattern).patternFinished().build(); 91 89 // When 92 90 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;21 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 21 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 22 22 import static org.fest.assertions.api.Assertions.assertThat; 23 23 … … 59 59 "}"; 60 60 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 61 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 62 InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 63 InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 64 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(endsWithPattern).build(); 61 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build(); 62 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 63 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).endsWithPattern(endsWithPattern).patternFinished().build(); 65 64 // When 66 65 boolean patternContained = pattern.containedIn(taskTree); … … 90 89 "}"; 91 90 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 92 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 93 InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 94 InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 95 InteractionPattern pattern = patternBuilder.concernedNode(ITERATION).startsWith(endsWithPattern).endsWith(startsWithPattern).build(); 91 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build(); 92 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 93 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithPattern(endsWithPattern).endsWithPattern(startsWithPattern).patternFinished().build(); 96 94 // When 97 95 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 20 20 import static org.fest.assertions.api.Assertions.assertThat; 21 21 … … 51 51 "}"; 52 52 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 53 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build();53 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).patternFinished().build(); 54 54 // When 55 55 boolean patternContained = pattern.containedIn(taskTree); … … 82 82 "}"; 83 83 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 84 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build();84 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).patternFinished().build(); 85 85 // When 86 86 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 57 57 "}"; 58 58 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 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(); 59 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(MOUSE_CLICK).patternFinished().build(); 60 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithPattern(endsWithPattern).patternFinished().build(); 62 61 // When 63 62 boolean patternContained = pattern.containedIn(taskTree); … … 93 92 "}"; 94 93 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 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(); 94 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 95 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build(); 98 96 // When 99 97 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndEndsWithPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 50 50 "}"; 51 51 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 52 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 53 InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 54 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 52 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build(); 53 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build(); 55 54 // When 56 55 boolean patternContained = pattern.containedIn(taskTree); … … 72 71 "}"; 73 72 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 74 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 75 InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 76 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 73 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build(); 74 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build(); 77 75 // When 78 76 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsEventEndsWithPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 50 50 "}"; 51 51 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 52 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 53 InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 54 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build(); 52 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build(); 53 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithPattern(endsWithPattern).patternFinished().build(); 55 54 // When 56 55 boolean patternContained = pattern.containedIn(taskTree); … … 72 71 "}"; 73 72 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 74 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 75 InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 76 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build(); 73 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build(); 74 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithPattern(endsWithPattern).patternFinished().build(); 77 75 // When 78 76 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 60 60 "}"; 61 61 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 62 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 63 InteractionPattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 64 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(TEXT_INPUT).build(); 62 InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 63 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsPattern(containedPattern).endsWithEvent(TEXT_INPUT).patternFinished().build(); 65 64 // When 66 65 boolean patternContained = pattern.containedIn(taskTree); … … 92 91 "}"; 93 92 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 94 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 95 InteractionPattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 96 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(TEXT_INPUT).build(); 93 InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 94 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsPattern(containedPattern).endsWithEvent(TEXT_INPUT).patternFinished().build(); 97 95 // When 98 96 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;21 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 21 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 22 22 import static org.fest.assertions.api.Assertions.assertThat; 23 23 … … 61 61 "}"; 62 62 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 63 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 64 InteractionPattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 65 InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 66 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(endsWithPattern).build(); 63 InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 64 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build(); 65 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsPattern(containedPattern).endsWithPattern(endsWithPattern).patternFinished().build(); 67 66 // When 68 67 boolean patternContained = pattern.containedIn(taskTree); … … 91 90 "}"; 92 91 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 93 InteractionPatternBuilder builder = new InteractionPatternBuilder(); 94 InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 95 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 92 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build(); 93 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build(); 96 94 // When 97 95 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 19 19 import static org.fest.assertions.api.Assertions.assertThat; 20 20 … … 39 39 // Given 40 40 String spec = "UserSession {" + 41 41 " Selection sel1 {" + 42 42 " EventTask target1 {}" + 43 43 " }" + … … 50 50 "}"; 51 51 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 52 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).build();52 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).patternFinished().build(); 53 53 // When 54 54 boolean patternContained = pattern.containedIn(taskTree); … … 61 61 // Given 62 62 String spec = "UserSession {" + 63 63 " Iteration iter1 {" + 64 64 " Selection sel1 {" + 65 65 " EventTask target2 {}" + … … 71 71 "}"; 72 72 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 73 InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).build();73 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).patternFinished().build(); 74 74 // When 75 75 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 54 54 "}"; 55 55 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 56 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 57 InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(TEXT_INPUT).build(); 58 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).build(); 56 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(TEXT_INPUT).patternFinished().build(); 57 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).patternFinished().build(); 59 58 // When 60 59 boolean patternContained = pattern.containedIn(taskTree); … … 79 78 "}"; 80 79 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 81 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 82 InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(TEXT_INPUT).build(); 83 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).build(); 80 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(TEXT_INPUT).patternFinished().build(); 81 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).patternFinished().build(); 84 82 // When 85 83 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;21 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 21 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 22 22 import static org.fest.assertions.api.Assertions.assertThat; 23 23 … … 62 62 "}"; 63 63 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 64 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 65 InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 66 InteractionPattern containedPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 67 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).build(); 64 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build(); 65 InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 66 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containedPattern).patternFinished().build(); 68 67 // When 69 68 boolean patternContained = pattern.containedIn(taskTree); … … 96 95 "}"; 97 96 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 98 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 99 InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 100 InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 101 InteractionPattern pattern = patternBuilder.concernedNode(ITERATION).startsWith(endsWithPattern).endsWith(startsWithPattern).build(); 97 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build(); 98 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 99 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithPattern(endsWithPattern).endsWithPattern(startsWithPattern).patternFinished().build(); 102 100 // When 103 101 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndEndsWithEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 59 59 "}"; 60 60 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 61 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 62 InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 63 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(TEXT_INPUT).build(); 61 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 62 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).endsWithEvent(TEXT_INPUT).patternFinished().build(); 64 63 // When 65 64 boolean patternContained = pattern.containedIn(taskTree); … … 90 89 "}"; 91 90 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 92 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 93 InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 94 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(TEXT_INPUT).build(); 91 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 92 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).endsWithEvent(TEXT_INPUT).patternFinished().build(); 95 93 // When 96 94 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 59 59 "}"; 60 60 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 61 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 62 InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 63 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 61 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 62 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 64 63 // When 65 64 boolean patternContained = pattern.containedIn(taskTree); … … 90 89 "}"; 91 90 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 92 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 93 InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 94 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 91 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 92 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 95 93 // When 96 94 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.SCROLL;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;21 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.SCROLL; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 21 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 22 22 import static org.fest.assertions.api.Assertions.assertThat; 23 23 … … 72 72 "}"; 73 73 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 74 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 75 InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 76 InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 77 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 74 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 75 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 76 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build(); 78 77 // When 79 78 boolean patternContained = pattern.containedIn(taskTree); … … 116 115 "}"; 117 116 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 118 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 119 InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 120 InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 121 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(SCROLL).endsWith(endsWithPattern).build(); 117 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 118 InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 119 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(SCROLL).endsWithPattern(endsWithPattern).patternFinished().build(); 122 120 // When 123 121 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsPatternAndEndsWithEventTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SELECTION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 62 62 "}"; 63 63 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 64 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 65 InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 66 InteractionPattern containsPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).build(); 67 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containsPattern).endsWith(TEXT_INPUT).build(); 64 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 65 InteractionPattern containsPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).patternFinished().build(); 66 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containsPattern).endsWithEvent(TEXT_INPUT).patternFinished().build(); 68 67 // When 69 68 boolean patternContained = pattern.containedIn(taskTree); … … 97 96 "}"; 98 97 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 99 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 100 InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 101 InteractionPattern containsPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 102 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containsPattern).endsWith(TEXT_INPUT).build(); 98 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build(); 99 InteractionPattern containsPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 100 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containsPattern).endsWithEvent(TEXT_INPUT).patternFinished().build(); 103 101 // When 104 102 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternTest.java
r1205 r1218 15 15 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith; 16 16 17 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.MOUSE_CLICK;18 import static de.ugoe.cs.autoquest.usability.task tree.filters.EventTypeFilter.TEXT_INPUT;19 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.ITERATION;20 import static de.ugoe.cs.autoquest.usability.task tree.filters.TaskTypeFilter.SEQUENCE;17 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK; 18 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT; 19 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION; 20 import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE; 21 21 import static org.fest.assertions.api.Assertions.assertThat; 22 22 … … 57 57 "}"; 58 58 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 59 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 60 InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build(); 61 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).build(); 59 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).patternFinished().build(); 60 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).patternFinished().build(); 62 61 // When 63 62 boolean patternContained = pattern.containedIn(taskTree); … … 86 85 "}"; 87 86 ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 88 InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 89 InteractionPattern startsWithPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 90 InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).build(); 87 InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build(); 88 InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).patternFinished().build(); 91 89 // When 92 90 boolean patternContained = pattern.containedIn(taskTree); -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/FestConditionUtil.java
r1141 r1218 19 19 import com.google.common.base.Optional; 20 20 21 import de.ugoe.cs.autoquest.usability.result.Usability Defect;22 import de.ugoe.cs.autoquest.usability.result.Usability DefectSeverityLevel;21 import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription; 22 import de.ugoe.cs.autoquest.usability.result.UsabilityProblemSeverityLevel; 23 23 import de.ugoe.cs.autoquest.usability.rules.UsabilityResult; 24 24 … … 41 41 @Override 42 42 public boolean matches(UsabilityResult usabilityResult) { 43 return !usabilityResult.hasDe fects();43 return !usabilityResult.hasDetectedProblems(); 44 44 } 45 45 }; … … 51 51 @Override 52 52 public boolean matches(UsabilityResult usabilityResult) { 53 return usabilityResult.hasDe fects();53 return usabilityResult.hasDetectedProblems(); 54 54 } 55 55 }; 56 56 } 57 57 58 public static Condition<Optional<Usability Defect>> present() {59 return new Condition<Optional<Usability Defect>>() {58 public static Condition<Optional<UsabilityProblemDescription>> present() { 59 return new Condition<Optional<UsabilityProblemDescription>>() { 60 60 61 61 @Override 62 public boolean matches(Optional<Usability Defect> usabilityGuidlineRecommendation) {62 public boolean matches(Optional<UsabilityProblemDescription> usabilityGuidlineRecommendation) { 63 63 return usabilityGuidlineRecommendation.isPresent(); 64 64 } … … 67 67 } 68 68 69 public static Condition<Optional<Usability Defect>> absent() {70 return new Condition<Optional<Usability Defect>>() {69 public static Condition<Optional<UsabilityProblemDescription>> absent() { 70 return new Condition<Optional<UsabilityProblemDescription>>() { 71 71 72 72 @Override 73 public boolean matches(Optional<Usability Defect> usabilityGuidlineRecommendation) {73 public boolean matches(Optional<UsabilityProblemDescription> usabilityGuidlineRecommendation) { 74 74 return !usabilityGuidlineRecommendation.isPresent(); 75 75 } … … 78 78 } 79 79 80 public static Condition<Optional<Usability Defect>> infoRecommendationSeverityLevel() {81 return new Condition<Optional<Usability Defect>>() {80 public static Condition<Optional<UsabilityProblemDescription>> infoRecommendationSeverityLevel() { 81 return new Condition<Optional<UsabilityProblemDescription>>() { 82 82 83 83 @Override 84 public boolean matches(Optional<Usability Defect> usabilityGuidlineRecommendation) {84 public boolean matches(Optional<UsabilityProblemDescription> usabilityGuidlineRecommendation) { 85 85 return usabilityGuidlineRecommendation.get().getSeverityLevel() 86 .equals(Usability DefectSeverityLevel.INFO);86 .equals(UsabilityProblemSeverityLevel.INFO); 87 87 } 88 88 … … 90 90 } 91 91 92 public static Condition<Optional<Usability Defect>> lowRecommendationSeverityLevel() {93 return new Condition<Optional<Usability Defect>>() {92 public static Condition<Optional<UsabilityProblemDescription>> lowRecommendationSeverityLevel() { 93 return new Condition<Optional<UsabilityProblemDescription>>() { 94 94 95 95 @Override 96 public boolean matches(Optional<Usability Defect> usabilityGuidlineRecommendation) {96 public boolean matches(Optional<UsabilityProblemDescription> usabilityGuidlineRecommendation) { 97 97 return usabilityGuidlineRecommendation.get().getSeverityLevel() 98 .equals(Usability DefectSeverityLevel.LOW);98 .equals(UsabilityProblemSeverityLevel.LOW); 99 99 } 100 100 … … 102 102 } 103 103 104 public static Condition<Optional<Usability Defect>> mediumRecommendationSeverityLevel() {105 return new Condition<Optional<Usability Defect>>() {104 public static Condition<Optional<UsabilityProblemDescription>> mediumRecommendationSeverityLevel() { 105 return new Condition<Optional<UsabilityProblemDescription>>() { 106 106 107 107 @Override 108 public boolean matches(Optional<Usability Defect> usabilityGuidlineRecommendation) {108 public boolean matches(Optional<UsabilityProblemDescription> usabilityGuidlineRecommendation) { 109 109 return usabilityGuidlineRecommendation.get().getSeverityLevel() 110 .equals(Usability DefectSeverityLevel.MEDIUM);110 .equals(UsabilityProblemSeverityLevel.MEDIUM); 111 111 } 112 112 … … 114 114 } 115 115 116 public static Condition<Optional<Usability Defect>> highRecommendationSeverityLevel() {117 return new Condition<Optional<Usability Defect>>() {116 public static Condition<Optional<UsabilityProblemDescription>> highRecommendationSeverityLevel() { 117 return new Condition<Optional<UsabilityProblemDescription>>() { 118 118 119 119 @Override 120 public boolean matches(Optional<Usability Defect> usabilityGuidlineRecommendation) {120 public boolean matches(Optional<UsabilityProblemDescription> usabilityGuidlineRecommendation) { 121 121 return usabilityGuidlineRecommendation.get().getSeverityLevel() 122 .equals(Usability DefectSeverityLevel.HIGH);122 .equals(UsabilityProblemSeverityLevel.HIGH); 123 123 } 124 124 -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/GenerateTaskModelUtil.java
r1165 r1218 15 15 package de.ugoe.cs.autoquest.usability.testutil; 16 16 17 import java.util.Arrays; 17 18 import java.util.List; 18 19 import java.util.logging.Level; … … 51 52 private static final String taskTreeName = "taskTree"; 52 53 53 public static ITaskModel getTaskModelFromSpec(String spec) {54 public static ITaskModel getTaskModelFromSpec(String... userSessions) { 54 55 ITaskFactory factory = new TaskFactory(); 55 ITaskInstanceList taskInstances = new TaskTreeDecoder(factory, new TaskBuilder()).decode(spec); 56 List<IUserSession> userSessions = Lists.newArrayList(); 57 userSessions.add((IUserSession) taskInstances); 58 return factory.createTaskModel(userSessions); 56 TaskTreeDecoder taskTreeDecoder = new TaskTreeDecoder(factory, new TaskBuilder()); 57 List<IUserSession> userSessionsList = Lists.newArrayList(); 58 for(String userSession: Arrays.asList(userSessions)) { 59 ITaskInstanceList taskInstances = taskTreeDecoder.decode(userSession); 60 userSessionsList.add((IUserSession) taskInstances); 61 } 62 return factory.createTaskModel(userSessionsList); 59 63 } 60 64 61 65 public static ITaskModel getTaskTreeFromFile(String filename) { 62 new TextConsole(Level. OFF);66 new TextConsole(Level.ALL); 63 67 parseTraceFile(filename); 64 68 condenseGuiModel();
Note: See TracChangeset
for help on using the changeset viewer.