Changeset 1040 for trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/FestConditionUtil.java
- Timestamp:
- 01/16/13 17:51:51 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/FestConditionUtil.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. 14 1 15 package de.ugoe.cs.autoquest.usability.testutil; 2 16 … … 10 24 import de.ugoe.cs.autoquest.usability.evaluation.rule.set.UsabilityRuleset; 11 25 26 /** 27 * <p> 28 * TODO comment 29 * </p> 30 * 31 * @author Alexander Deicke 32 */ 12 33 public class FestConditionUtil { 13 34 … … 15 36 // no good idea 16 37 } 17 38 18 39 public static Condition<UsabilityEvaluationReport> noUsabilityGuidlineRecommendations() { 19 40 return new Condition<UsabilityEvaluationReport>() { 20 41 21 42 @Override 22 43 public boolean matches(UsabilityEvaluationReport usabilityEvaluationReport) { … … 25 46 }; 26 47 } 27 48 28 49 public static Condition<UsabilityEvaluationReport> usabilityGuidlineRecommendations() { 29 50 return new Condition<UsabilityEvaluationReport>() { 30 51 31 52 @Override 32 53 public boolean matches(UsabilityEvaluationReport usabilityEvaluationReport) { … … 35 56 }; 36 57 } 37 58 38 59 public static Condition<UsabilityRuleset> noUsabilityRules() { 39 60 return new Condition<UsabilityRuleset>() { … … 43 64 return usabilityRuleset.evaluationRules().isEmpty(); 44 65 } 45 46 66 47 67 }; 48 68 } 49 69 50 70 public static Condition<UsabilityRuleset> usabilityRules() { 51 71 return new Condition<UsabilityRuleset>() { … … 55 75 return !usabilityRuleset.evaluationRules().isEmpty(); 56 76 } 57 58 77 59 78 }; 60 79 } 61 80 62 81 public static Condition<Optional<UsabilityDefect>> present() { 63 82 return new Condition<Optional<UsabilityDefect>>() { … … 67 86 return usabilityGuidlineRecommendation.isPresent(); 68 87 } 69 88 70 89 }; 71 90 } 72 91 73 92 public static Condition<Optional<UsabilityDefect>> absent() { 74 93 return new Condition<Optional<UsabilityDefect>>() { … … 78 97 return !usabilityGuidlineRecommendation.isPresent(); 79 98 } 80 99 81 100 }; 82 101 } 83 102 84 103 public static Condition<Optional<UsabilityDefect>> infoRecommendationSeverityLevel() { 85 104 return new Condition<Optional<UsabilityDefect>>() { … … 87 106 @Override 88 107 public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 89 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.INFO); 108 return usabilityGuidlineRecommendation.get().getSeverityLevel() 109 .equals(UsabilityDefectSeverityLevel.INFO); 90 110 } 91 111 92 112 }; 93 113 } 94 114 95 115 public static Condition<Optional<UsabilityDefect>> lowRecommendationSeverityLevel() { 96 116 return new Condition<Optional<UsabilityDefect>>() { … … 98 118 @Override 99 119 public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 100 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.LOW); 120 return usabilityGuidlineRecommendation.get().getSeverityLevel() 121 .equals(UsabilityDefectSeverityLevel.LOW); 101 122 } 102 123 103 124 }; 104 125 } 105 126 106 127 public static Condition<Optional<UsabilityDefect>> mediumRecommendationSeverityLevel() { 107 128 return new Condition<Optional<UsabilityDefect>>() { … … 109 130 @Override 110 131 public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 111 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.MEDIUM); 132 return usabilityGuidlineRecommendation.get().getSeverityLevel() 133 .equals(UsabilityDefectSeverityLevel.MEDIUM); 112 134 } 113 135 114 136 }; 115 137 } 116 138 117 139 public static Condition<Optional<UsabilityDefect>> highRecommendationSeverityLevel() { 118 140 return new Condition<Optional<UsabilityDefect>>() { … … 120 142 @Override 121 143 public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 122 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.HIGH); 144 return usabilityGuidlineRecommendation.get().getSeverityLevel() 145 .equals(UsabilityDefectSeverityLevel.HIGH); 123 146 } 124 147 125 148 }; 126 149 } 127 150 128 151 }
Note: See TracChangeset
for help on using the changeset viewer.