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
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 
    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} 
Note: See TracChangeset for help on using the changeset viewer.