Changeset 1040 for trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule
- 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
- Files:
-
- 6 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 -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/set/EmptyUsabilityRulesetTest.java
r1030 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. 14 1 15 package de.ugoe.cs.autoquest.usability.evaluation.rule.set; 2 16 … … 6 20 import org.junit.Test; 7 21 22 /** 23 * <p> 24 * TODO comment 25 * </p> 26 * 27 * @author Alexander Deicke 28 */ 8 29 public class EmptyUsabilityRulesetTest { 9 30 -
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/set/RulesetFactoryTest.java
r1030 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. 14 1 15 package de.ugoe.cs.autoquest.usability.evaluation.rule.set; 2 16 … … 10 24 import org.junit.Test; 11 25 26 /** 27 * <p> 28 * TODO comment 29 * </p> 30 * 31 * @author Alexander Deicke 32 */ 12 33 public class RulesetFactoryTest { 13 34 14 35 @Test 15 36 public void empty_ruleset_factory_method_should_return_empty_ruleset() { 16 17 37 UsabilityRuleset ruleset = emptyUsabilityRuleset(); 38 assertThat(ruleset).isInstanceOf(EmptyUsabilityRuleset.class).has(noUsabilityRules()); 18 39 } 19 40 20 41 @Test 21 42 public void text_input_ruleset_factory_method_should_return_text_input_ruleset() { 22 23 43 UsabilityRuleset ruleset = textInputUsabiliyRuleset(); 44 assertThat(ruleset).isInstanceOf(TextInputUsabiliyRuleset.class).has(usabilityRules()); 24 45 } 25 46 26 47 @Test 27 48 public void mouse_interaction_ruleset_factory_method_should_return_mouse_interaction_ruleset() { 28 49 UsabilityRuleset ruleset = mouseInteractionUsabiliyRuleset(); 29 assertThat(ruleset).isInstanceOf(MouseInteractionUsabilityRuleset.class).has(usabilityRules()); 50 assertThat(ruleset).isInstanceOf(MouseInteractionUsabilityRuleset.class) 51 .has(usabilityRules()); 30 52 } 31 53
Note: See TracChangeset
for help on using the changeset viewer.