Ignore:
Timestamp:
01/16/13 17:51:51 (11 years ago)
Author:
adeicke
Message:
  • Removed lombok related annotations and util class
  • Added comments and formating due to match project defaults
Location:
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/DummyUsabilityGuidlineDescriptionResolver.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 
    115package de.ugoe.cs.autoquest.usability.testutil; 
    216 
     
    519import de.ugoe.cs.autoquest.usability.evaluation.rule.set.UsabilityRule; 
    620 
    7 public class DummyUsabilityGuidlineDescriptionResolver implements UsabilityDefectDescriptionResolver { 
     21/** 
     22 * <p> 
     23 * TODO comment 
     24 * </p> 
     25 *  
     26 * @author Alexander Deicke 
     27 */ 
     28public class DummyUsabilityGuidlineDescriptionResolver implements 
     29    UsabilityDefectDescriptionResolver 
     30{ 
    831 
    932    public DefectDescription descriptionFor(UsabilityRule usabilityRule) { 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/DummyUsabilityRuleset.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 
    115package de.ugoe.cs.autoquest.usability.testutil; 
    216 
     
    1327import de.ugoe.cs.autoquest.usability.evaluation.rule.set.UsabilityRuleset; 
    1428 
     29/** 
     30 * <p> 
     31 * TODO comment 
     32 * </p> 
     33 *  
     34 * @author Alexander Deicke 
     35 */ 
    1536public class DummyUsabilityRuleset implements UsabilityRuleset { 
    1637 
    1738    private enum DummyUsabilityRule implements UsabilityRule { 
    18          
     39 
    1940        DUMMY_RULE_WITH_RECOMMENDATION { 
    20              
     41 
    2142            @Override 
    2243            public Optional<UsabilityDefect> evaluate(ITaskTree taskTree) { 
    23                 return Optional.of(new UsabilityDefectFactory(new DummyUsabilityGuidlineDescriptionResolver()). 
    24                                    createUsabilityGuidlineRecommendation(UsabilityDefectSeverityLevel.INFO, this, Collections.<String, String> emptyMap())); 
     44                return Optional 
     45                    .of(new UsabilityDefectFactory(new DummyUsabilityGuidlineDescriptionResolver()) 
     46                        .createUsabilityGuidlineRecommendation(UsabilityDefectSeverityLevel.INFO, 
     47                                                               this, Collections 
     48                                                                   .<String, String> emptyMap())); 
    2549            } 
    2650 
     
    2852                return this.name(); 
    2953            } 
    30              
     54 
    3155        }, 
    32          
     56 
    3357        DUMMY_RULE_WITHOUT_RECOMMENDATION { 
    34              
     58 
    3559            @Override 
    3660            public Optional<UsabilityDefect> evaluate(ITaskTree taskTree) { 
     
    4670 
    4771    } 
    48      
    49     private final EnumSet<DummyUsabilityRule> DUMMY_USABILITY_RULESET =  
    50             EnumSet.allOf(DummyUsabilityRule.class); 
     72 
     73    private final EnumSet<DummyUsabilityRule> DUMMY_USABILITY_RULESET = EnumSet 
     74        .allOf(DummyUsabilityRule.class); 
    5175 
    5276    public EnumSet<? extends UsabilityRule> evaluationRules() { 
  • 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 
    115package de.ugoe.cs.autoquest.usability.testutil; 
    216 
     
    1024import de.ugoe.cs.autoquest.usability.evaluation.rule.set.UsabilityRuleset; 
    1125 
     26/** 
     27 * <p> 
     28 * TODO comment 
     29 * </p> 
     30 *  
     31 * @author Alexander Deicke 
     32 */ 
    1233public class FestConditionUtil { 
    1334 
     
    1536        // no good idea 
    1637    } 
    17      
     38 
    1839    public static Condition<UsabilityEvaluationReport> noUsabilityGuidlineRecommendations() { 
    1940        return new Condition<UsabilityEvaluationReport>() { 
    20      
     41 
    2142            @Override 
    2243            public boolean matches(UsabilityEvaluationReport usabilityEvaluationReport) { 
     
    2546        }; 
    2647    } 
    27      
     48 
    2849    public static Condition<UsabilityEvaluationReport> usabilityGuidlineRecommendations() { 
    2950        return new Condition<UsabilityEvaluationReport>() { 
    30      
     51 
    3152            @Override 
    3253            public boolean matches(UsabilityEvaluationReport usabilityEvaluationReport) { 
     
    3556        }; 
    3657    } 
    37      
     58 
    3859    public static Condition<UsabilityRuleset> noUsabilityRules() { 
    3960        return new Condition<UsabilityRuleset>() { 
     
    4364                return usabilityRuleset.evaluationRules().isEmpty(); 
    4465            } 
    45      
    4666 
    4767        }; 
    4868    } 
    49      
     69 
    5070    public static Condition<UsabilityRuleset> usabilityRules() { 
    5171        return new Condition<UsabilityRuleset>() { 
     
    5575                return !usabilityRuleset.evaluationRules().isEmpty(); 
    5676            } 
    57      
    5877 
    5978        }; 
    6079    } 
    61      
     80 
    6281    public static Condition<Optional<UsabilityDefect>> present() { 
    6382        return new Condition<Optional<UsabilityDefect>>() { 
     
    6786                return usabilityGuidlineRecommendation.isPresent(); 
    6887            } 
    69      
     88 
    7089        }; 
    7190    } 
    72      
     91 
    7392    public static Condition<Optional<UsabilityDefect>> absent() { 
    7493        return new Condition<Optional<UsabilityDefect>>() { 
     
    7897                return !usabilityGuidlineRecommendation.isPresent(); 
    7998            } 
    80      
     99 
    81100        }; 
    82101    } 
    83      
     102 
    84103    public static Condition<Optional<UsabilityDefect>> infoRecommendationSeverityLevel() { 
    85104        return new Condition<Optional<UsabilityDefect>>() { 
     
    87106            @Override 
    88107            public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 
    89                 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.INFO); 
     108                return usabilityGuidlineRecommendation.get().getSeverityLevel() 
     109                    .equals(UsabilityDefectSeverityLevel.INFO); 
    90110            } 
    91111 
    92112        }; 
    93113    } 
    94      
     114 
    95115    public static Condition<Optional<UsabilityDefect>> lowRecommendationSeverityLevel() { 
    96116        return new Condition<Optional<UsabilityDefect>>() { 
     
    98118            @Override 
    99119            public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 
    100                 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.LOW); 
     120                return usabilityGuidlineRecommendation.get().getSeverityLevel() 
     121                    .equals(UsabilityDefectSeverityLevel.LOW); 
    101122            } 
    102123 
    103124        }; 
    104125    } 
    105      
     126 
    106127    public static Condition<Optional<UsabilityDefect>> mediumRecommendationSeverityLevel() { 
    107128        return new Condition<Optional<UsabilityDefect>>() { 
     
    109130            @Override 
    110131            public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 
    111                 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.MEDIUM); 
     132                return usabilityGuidlineRecommendation.get().getSeverityLevel() 
     133                    .equals(UsabilityDefectSeverityLevel.MEDIUM); 
    112134            } 
    113135 
    114136        }; 
    115137    } 
    116      
     138 
    117139    public static Condition<Optional<UsabilityDefect>> highRecommendationSeverityLevel() { 
    118140        return new Condition<Optional<UsabilityDefect>>() { 
     
    120142            @Override 
    121143            public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 
    122                 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.HIGH); 
     144                return usabilityGuidlineRecommendation.get().getSeverityLevel() 
     145                    .equals(UsabilityDefectSeverityLevel.HIGH); 
    123146            } 
    124147 
    125148        }; 
    126149    } 
    127      
     150 
    128151} 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/GenerateTaskTreeUtil.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. 
    114 
    215package de.ugoe.cs.autoquest.usability.testutil; 
     
    1730import de.ugoe.cs.util.console.TextConsole; 
    1831 
     32/** 
     33 * <p> 
     34 * TODO comment 
     35 * </p> 
     36 *  
     37 * @author Alexander Deicke 
     38 */ 
    1939public class GenerateTaskTreeUtil { 
    20      
     40 
    2141    private static final String seqName = "sequences"; 
    2242 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/TaskTreeBuilder.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 
    115package de.ugoe.cs.autoquest.usability.testutil; 
    216 
     
    620import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskTreeNodeFactory; 
    721 
     22/** 
     23 * <p> 
     24 * TODO comment 
     25 * </p> 
     26 *  
     27 * @author Alexander Deicke 
     28 */ 
    829public class TaskTreeBuilder { 
    9      
     30 
    1031    public static CreateRootNodeStep builder() { 
    1132        return new CreateRootNodeStep(); 
    1233    } 
    13      
     34 
    1435    public static class CreateRootNodeStep { 
    15          
     36 
    1637        public AddChildrenStep root(String name) { 
    1738            return new AddChildrenStep(new TaskTreeNode(name)); 
    1839        } 
    19          
     40 
    2041    } 
    21      
     42 
    2243    public static class AddChildrenStep { 
    23          
     44 
    2445        private TaskTreeNode rootNode; 
    25          
     46 
    2647        public AddChildrenStep(TaskTreeNode taskTreeRootNode) { 
    2748            this.rootNode = taskTreeRootNode; 
     
    3253            return this; 
    3354        } 
    34          
     55 
    3556        public ITaskTree creatTaskTree() { 
    3657            return new TaskTreeNodeFactory().createTaskTree(rootNode); 
    3758        } 
    38          
     59 
    3960    } 
    40      
    41 //        private Employee employee; 
    42 // 
    43 //        public EmployeeBuilder() { 
    44 //            employee = new Employee(); 
    45 //        } 
    46 // 
    47 //        public static EmployeeBuilder defaultValues() { 
    48 //            return new EmployeeBuilder(); 
    49 //        } 
    50 // 
    51 //        public static EmployeeBuilder clone(Employee toClone) { 
    52 //            EmployeeBuilder builder = defaultValues(); 
    53 //            builder.setId(toClone.getId()); 
    54 //            builder.setName(toClone.getName()); 
    55 //            builder.setDepartment(toClone.getDepartment()); 
    56 //            return builder; 
    57 //        } 
    58 // 
    59 //        public static EmployeeBuilder random() { 
    60 //            EmployeeBuilder builder = defaultValues(); 
    61 //            builder.setId(getRandomInteger(0, 1000)); 
    62 //            builder.setName(getRandomString(20)); 
    63 //            builder.setDepartment(Department.values()[getRandomInteger(0, Department.values().length - 1)]); 
    64 //            return builder; 
    65 //        } 
    66 // 
    67 //        public EmployeeBuilder setId(int id) { 
    68 //            employee.setId(id); 
    69 //            return this; 
    70 //        } 
    71 // 
    72 //        public EmployeeBuilder setName(String name) { 
    73 //            employee.setName(name); 
    74 //            return this; 
    75 //        } 
    76 // 
    77 //        public EmployeeBuilder setDepartment(Department dept) { 
    78 //            employee.setDepartment(dept); 
    79 //            return this; 
    80 //        } 
    81 // 
    82 //        public Employee build() { 
    83 //            return employee; 
    84 //        } 
    85 //    } 
     61 
     62    // private Employee employee; 
     63    // 
     64    // public EmployeeBuilder() { 
     65    // employee = new Employee(); 
     66    // } 
     67    // 
     68    // public static EmployeeBuilder defaultValues() { 
     69    // return new EmployeeBuilder(); 
     70    // } 
     71    // 
     72    // public static EmployeeBuilder clone(Employee toClone) { 
     73    // EmployeeBuilder builder = defaultValues(); 
     74    // builder.setId(toClone.getId()); 
     75    // builder.setName(toClone.getName()); 
     76    // builder.setDepartment(toClone.getDepartment()); 
     77    // return builder; 
     78    // } 
     79    // 
     80    // public static EmployeeBuilder random() { 
     81    // EmployeeBuilder builder = defaultValues(); 
     82    // builder.setId(getRandomInteger(0, 1000)); 
     83    // builder.setName(getRandomString(20)); 
     84    // builder.setDepartment(Department.values()[getRandomInteger(0, Department.values().length - 
     85    // 1)]); 
     86    // return builder; 
     87    // } 
     88    // 
     89    // public EmployeeBuilder setId(int id) { 
     90    // employee.setId(id); 
     91    // return this; 
     92    // } 
     93    // 
     94    // public EmployeeBuilder setName(String name) { 
     95    // employee.setName(name); 
     96    // return this; 
     97    // } 
     98    // 
     99    // public EmployeeBuilder setDepartment(Department dept) { 
     100    // employee.setDepartment(dept); 
     101    // return this; 
     102    // } 
     103    // 
     104    // public Employee build() { 
     105    // return employee; 
     106    // } 
     107    // } 
    86108 
    87109} 
Note: See TracChangeset for help on using the changeset viewer.