Changeset 1040 for trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator
- Timestamp:
- 01/16/13 17:51:51 (11 years ago)
- Location:
- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/AbstractUsabilityEvaluationTC.java
r1030 r1040 88 88 * @param evaluateUsability 89 89 */ 90 protected void assertUsabilityEvaluationResult(UsabilityDefect[] 90 protected void assertUsabilityEvaluationResult(UsabilityDefect[] expectedDefects, 91 91 UsabilityEvaluationResult evaluationResult) 92 92 { 93 93 assertEquals(expectedDefects.length, evaluationResult.getAllDefects().size()); 94 94 95 EXPECTED_DEFECT_ITERATION: 96 for (UsabilityDefect expectedDefect : expectedDefects) { 95 EXPECTED_DEFECT_ITERATION: for (UsabilityDefect expectedDefect : expectedDefects) { 97 96 for (UsabilityDefect defect : evaluationResult.getAllDefects()) { 98 97 if (expectedDefect.equals(defect)) { … … 167 166 168 167 if ("Interaction".equals(type)) { 169 return taskTreeNodeFactory.createNewEventTask 170 (new DummyInteraction("dummy", typeNumbers[0]++), new DummyGUIElement("dummy")); 168 return taskTreeNodeFactory.createNewEventTask(new DummyInteraction("dummy", 169 typeNumbers[0]++), 170 new DummyGUIElement("dummy")); 171 171 } 172 172 else if ("Sequence".equals(type)) { … … 185 185 186 186 TextInput textInput = new TextInput(additionalInfo, new ArrayList<Event>()); 187 188 IEventTask task = taskTreeNodeFactory.createNewEventTask 189 (textInput, new DummyTextField(additionalInfo)); 187 188 IEventTask task = 189 taskTreeNodeFactory.createNewEventTask(textInput, 190 new DummyTextField(additionalInfo)); 190 191 191 192 return task; … … 220 221 else { 221 222 fail("can not add children to parent task tree node of type " + 222 223 parent.getClass().getName()); 223 224 } 224 225 } -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/NoLetterOrDigitTextInputsEvaluatorTest.java
r1034 r1040 1 // Copyright 2012 Georg-August-Universität Göttingen, Germany 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 1 14 2 15 package de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator; … … 26 39 import de.ugoe.cs.autoquest.usability.tasktree.filter.FilterStatisticCache; 27 40 41 /** 42 * <p> 43 * TODO comment 44 * </p> 45 * 46 * @author Alexander Deicke 47 */ 28 48 public class NoLetterOrDigitTextInputsEvaluatorTest extends AbstractUsabilityEvaluationTC { 29 49 … … 32 52 @Before 33 53 public void initRuleUnderTest() { 34 EnumSet<? extends UsabilityRule> ruleset = 35 textInputUsabiliyRuleset().evaluationRules(); 54 EnumSet<? extends UsabilityRule> ruleset = textInputUsabiliyRuleset().evaluationRules(); 36 55 this.ruleUnderTest = Iterables.find(ruleset, new Predicate<UsabilityRule>() { 37 56 -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/TextInputEntryRepetitionsEvaluatorTest.java
r1034 r1040 1 // Copyright 2012 Georg-August-Universität Göttingen, Germany 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 1 14 2 15 package de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator; … … 26 39 import de.ugoe.cs.autoquest.usability.tasktree.filter.FilterStatisticCache; 27 40 41 /** 42 * <p> 43 * TODO comment 44 * </p> 45 * 46 * @author Alexander Deicke 47 */ 28 48 public class TextInputEntryRepetitionsEvaluatorTest extends AbstractUsabilityEvaluationTC { 29 49 … … 32 52 @Before 33 53 public void initRuleUnderTest() { 34 EnumSet<? extends UsabilityRule> ruleset = 35 textInputUsabiliyRuleset().evaluationRules(); 54 EnumSet<? extends UsabilityRule> ruleset = textInputUsabiliyRuleset().evaluationRules(); 36 55 this.ruleUnderTest = Iterables.find(ruleset, new Predicate<UsabilityRule>() { 37 56 … … 85 104 new TextInputEntryRepetitionsEvaluator(this.ruleUnderTest, taskTree).evaluationResult(); 86 105 // Then 87 assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel()); } 106 assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel()); 107 } 88 108 89 109 @Test -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/TextInputRatioEvaluatorTest.java
r1034 r1040 1 // Copyright 2012 Georg-August-Universität Göttingen, Germany 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 1 14 2 15 package de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator; … … 26 39 import de.ugoe.cs.autoquest.usability.tasktree.filter.FilterStatisticCache; 27 40 41 /** 42 * <p> 43 * TODO comment 44 * </p> 45 * 46 * @author Alexander Deicke 47 */ 28 48 public class TextInputRatioEvaluatorTest extends AbstractUsabilityEvaluationTC { 29 49 … … 32 52 @Before 33 53 public void initRuleUnderTest() { 34 EnumSet<? extends UsabilityRule> ruleset = 35 textInputUsabiliyRuleset().evaluationRules(); 54 EnumSet<? extends UsabilityRule> ruleset = textInputUsabiliyRuleset().evaluationRules(); 36 55 this.ruleUnderTest = Iterables.find(ruleset, new Predicate<UsabilityRule>() { 37 56
Note: See TracChangeset
for help on using the changeset viewer.