Changeset 1151


Ignore:
Timestamp:
04/07/13 21:49:02 (12 years ago)
Author:
adeicke
Message:

Added tests for usage pattern detection-

Location:
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability
Files:
11 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/AllTests.java

    r1040 r1151  
    1919import org.junit.runners.Suite.SuiteClasses; 
    2020 
    21 import de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator.NoLetterOrDigitTextInputsEvaluatorTest; 
    22 import de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator.TextInputEntryRepetitionsEvaluatorTest; 
    23 import de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator.TextInputRatioEvaluatorTest; 
    24 import de.ugoe.cs.autoquest.usability.evaluation.rule.set.EmptyUsabilityRulesetTest; 
    25 import de.ugoe.cs.autoquest.usability.evaluation.rule.set.RulesetFactoryTest; 
     21import de.ugoe.cs.autoquest.usability.rules.metrics.NoLetterOrDigitTextInputsEvaluatorTest; 
     22import de.ugoe.cs.autoquest.usability.rules.metrics.TextInputEntryRepetitionsEvaluatorTest; 
     23import de.ugoe.cs.autoquest.usability.rules.metrics.TextInputRatioEvaluatorTest; 
     24import de.ugoe.cs.autoquest.usability.rules.patterns.LongFormUsageDefectTest; 
     25import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains.ContainsAndEndsWithEventTest; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains.ContainsEventTest; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains.ContainsPatternTest; 
     28import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.endswith.EndsWithEventTest; 
     29import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.endswith.EndsWithPatternTest; 
     30import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsAndEndsWithEventAndContainsEventTest; 
     31import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsAndEndsWithEventTest; 
     32import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsAndEndsWithPatternAndContainsPatternTest; 
     33import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsAndEndsWithPatternTest; 
     34import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithEventAndContainsEventTest; 
     35import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithEventAndContainsPatternTest; 
     36import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithEventAndEndsWithPatternTest; 
     37import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithEventContainsEventEndsWithPatternTest; 
     38import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithEventContainsPatternAndEndsWithEventTest; 
     39import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithEventContainsPatternAndEndsWithPatternTest; 
     40import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithEventTest; 
     41import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithPatternAndContainsEventTest; 
     42import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithPatternAndContainsPatternTest; 
     43import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithPatternAndEndsWithEventTest; 
     44import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithPatternContainsEventAndEndsWithEventTest; 
     45import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithPatternContainsEventAndEndsWithPatternTest; 
     46import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithPatternContainsPatternAndEndsWithEventTest; 
     47import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith.StartsWithPatternTest; 
    2648 
    2749/** 
     
    3456@RunWith(Suite.class) 
    3557@SuiteClasses( 
    36     { UsabilityEvaluationFacadeTest.class, UsabilityEvaluationReportTest.class, 
    37         EmptyUsabilityRulesetTest.class, RulesetFactoryTest.class, 
    38         NoLetterOrDigitTextInputsEvaluatorTest.class, TextInputEntryRepetitionsEvaluatorTest.class, 
    39         TextInputRatioEvaluatorTest.class }) 
     58    { CMDperformUsabilityEvaluationTest.class,  
     59      NoLetterOrDigitTextInputsEvaluatorTest.class, 
     60      TextInputEntryRepetitionsEvaluatorTest.class,  
     61      TextInputRatioEvaluatorTest.class, 
     62      StartsWithEventTest.class, StartsWithPatternTest.class, 
     63      StartsWithEventAndContainsEventTest.class, StartsWithPatternAndContainsPatternTest.class, 
     64      StartsWithEventAndContainsPatternTest.class, StartsWithPatternAndContainsEventTest.class,  
     65      StartsAndEndsWithEventTest.class, StartsAndEndsWithPatternTest.class, 
     66      StartsWithEventAndEndsWithPatternTest.class, StartsWithPatternAndEndsWithEventTest.class, 
     67      StartsAndEndsWithEventAndContainsEventTest.class, StartsAndEndsWithPatternAndContainsPatternTest.class, 
     68      StartsWithEventContainsEventEndsWithPatternTest.class, StartsWithPatternContainsEventAndEndsWithPatternTest.class, 
     69      StartsWithEventContainsPatternAndEndsWithEventTest.class, StartsWithPatternContainsPatternAndEndsWithEventTest.class, 
     70      StartsWithEventContainsPatternAndEndsWithPatternTest.class, StartsWithPatternContainsEventAndEndsWithEventTest.class, 
     71      EndsWithEventTest.class, EndsWithPatternTest.class, 
     72      ContainsEventTest.class, ContainsPatternTest.class, 
     73      ContainsAndEndsWithEventTest.class, 
     74      // E -> P 
     75      // P -> E 
     76      // P -> P 
     77      LongFormUsageDefectTest.class 
     78    } 
     79) 
    4080public class AllTests { 
    4181 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluationTest.java

    r1141 r1151  
    7878        List<?> parameters = Lists.newArrayList("taskTree", "evaluationResult", "dummyParameter"); 
    7979        new CMDperformUsabilityEvaluation().run((List<Object>) parameters); 
    80         assertThat(getUsabilityEvaluationResult("evaluationResult")).isNotNull(); 
     80        assertThat(getUsabilityEvaluationResult("evaluationResult").isPresent()).isFalse(); 
    8181 
    8282    } 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/NoLetterOrDigitTextInputsEvaluatorTest.java

    r1141 r1151  
    4848        ITaskTree taskTree = createTaskTree(spec); 
    4949        // When 
    50         Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).check(); 
     50        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
    5151        // Then 
    5252        assertThat(recommendation).is(absent()); 
     
    6363        ITaskTree taskTree = createTaskTree(spec); 
    6464        // When 
    65         Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).check(); 
     65        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
    6666        // Then 
    6767        assertThat(recommendation).is(present()).has(infoRecommendationSeverityLevel()); 
     
    7777        ITaskTree taskTree = createTaskTree(spec); 
    7878        // When 
    79         Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).check(); 
     79        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
    8080        // Then 
    8181        assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel()); 
     
    9090        ITaskTree taskTree = createTaskTree(spec); 
    9191        // When 
    92         Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).check(); 
     92        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
    9393        // Then 
    9494        assertThat(recommendation).is(present()).has(mediumRecommendationSeverityLevel()); 
     
    103103        ITaskTree taskTree = createTaskTree(spec); 
    104104        // When 
    105         Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).check(); 
     105        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
    106106        // Then 
    107107        assertThat(recommendation).is(present()).has(highRecommendationSeverityLevel()); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputEntryRepetitionsEvaluatorTest.java

    r1141 r1151  
    4646        ITaskTree taskTree = createTaskTree(spec); 
    4747        // When 
    48         Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).check(); 
     48        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
    4949        // Then 
    5050        assertThat(recommendation).is(absent()); 
     
    5959        ITaskTree taskTree = createTaskTree(spec); 
    6060        // When 
    61         Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).check(); 
     61        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
    6262        // Then 
    6363        assertThat(recommendation).is(present()).has(infoRecommendationSeverityLevel()); 
     
    7272        ITaskTree taskTree = createTaskTree(spec); 
    7373        // When 
    74         Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).check(); 
     74        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
    7575        // Then 
    7676        assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel()); 
     
    9191        ITaskTree taskTree = createTaskTree(spec); 
    9292        // When 
    93         Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).check(); 
     93        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
    9494        // Then 
    9595        assertThat(recommendation).is(present()).has(mediumRecommendationSeverityLevel()); 
     
    110110        ITaskTree taskTree = createTaskTree(spec); 
    111111        // When 
    112         Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).check(); 
     112        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
    113113        // Then 
    114114        assertThat(recommendation).is(present()).has(highRecommendationSeverityLevel()); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputRatioEvaluatorTest.java

    r1141 r1151  
    4949        ITaskTree taskTree = createTaskTree(spec); 
    5050        // When 
    51         Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).check(); 
     51        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
    5252        // Then 
    5353        assertThat(recommendation).is(absent()); 
     
    6262        ITaskTree taskTree = createTaskTree(spec); 
    6363        // When 
    64         Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).check(); 
     64        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
    6565        // Then 
    6666        assertThat(recommendation).is(present()).has(infoRecommendationSeverityLevel()); 
     
    7575        ITaskTree taskTree = createTaskTree(spec); 
    7676        // When 
    77         Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).check(); 
     77        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
    7878        // Then 
    7979        assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel()); 
     
    8888        ITaskTree taskTree = createTaskTree(spec); 
    8989        // When 
    90         Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).check(); 
     90        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
    9191        // Then 
    9292        assertThat(recommendation).is(present()).has(mediumRecommendationSeverityLevel()); 
     
    9999        ITaskTree taskTree = createTaskTree(spec); 
    100100        // When 
    101         Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).check(); 
     101        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
    102102        // Then 
    103103        assertThat(recommendation).is(present()).has(highRecommendationSeverityLevel()); 
Note: See TracChangeset for help on using the changeset viewer.