Ignore:
Timestamp:
03/12/15 15:50:28 (9 years ago)
Author:
pharms
Message:
  • extension with further smell detections
  • may not fully work. But Hudson is more happy because compile errors should be gone
File:
1 edited

Legend:

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

    r1335 r1918  
    1515package de.ugoe.cs.autoquest.usability; 
    1616 
    17 import static de.ugoe.cs.autoquest.usability.UsabilityDefectDescription.TEXT_FIELD_INPUT_RATIO; 
    18 import static de.ugoe.cs.autoquest.usability.UsabilityDefectDescription.TEXT_FIELD_INPUT_REPETITIONS; 
    19 import static de.ugoe.cs.autoquest.usability.UsabilityDefectDescription.TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO; 
    20 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.HIGH; 
    21 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.INFO; 
    22 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.LOW; 
    23 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.MEDIUM; 
     17import static de.ugoe.cs.autoquest.usability.UsabilitySmellDescription.TEXT_FIELD_INPUT_RATIO; 
     18import static de.ugoe.cs.autoquest.usability.UsabilitySmellDescription.TEXT_FIELD_INPUT_REPETITIONS; 
     19import static de.ugoe.cs.autoquest.usability.UsabilitySmellDescription.TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO; 
    2420 
    2521import org.junit.Test; 
    2622 
    27 import de.ugoe.cs.autoquest.usability.UsabilityDefect; 
     23import de.ugoe.cs.autoquest.usability.UsabilitySmell; 
    2824 
    2925/** 
     
    4541            "}"; 
    4642         
    47         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    48             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) }; 
    49  
    50         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     43        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     44            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     45                                  TEXT_FIELD_INPUT_RATIO) }; 
     46 
     47        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    5148 
    5249    } 
     
    6865            "}"; 
    6966 
    70         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    71             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) }; 
    72  
    73         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     67        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     68            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     69                                  TEXT_FIELD_INPUT_RATIO) }; 
     70 
     71        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    7472 
    7573    } 
     
    9290            "}"; 
    9391 
    94         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    95             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) }; 
    96  
    97         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     92        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     93            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     94                                  TEXT_FIELD_INPUT_RATIO) }; 
     95 
     96        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    9897 
    9998    } 
     
    115114            "}"; 
    116115 
    117         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    118             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) }; 
    119  
    120         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     116        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     117            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     118                                  TEXT_FIELD_INPUT_RATIO) }; 
     119 
     120        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    121121 
    122122    } 
     
    177177            "}"; 
    178178 
    179         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    180             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) }; 
    181  
    182         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     179        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     180            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     181                                  TEXT_FIELD_INPUT_RATIO) }; 
     182 
     183        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    183184    } 
    184185 
     
    202203            "}"; 
    203204 
    204         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    205             { new UsabilityDefect(LOW, TEXT_FIELD_INPUT_RATIO) }; 
    206  
    207         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     205        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     206            { new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 
     207                                  TEXT_FIELD_INPUT_RATIO) }; 
     208 
     209        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    208210    } 
    209211 
     
    227229            "}"; 
    228230 
    229         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    230             { new UsabilityDefect(INFO, TEXT_FIELD_INPUT_RATIO) }; 
    231  
    232         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     231        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     232            { new UsabilitySmell(/*INFO*/ UsabilitySmellIntensity.getIntensity(0), 
     233                                  TEXT_FIELD_INPUT_RATIO) }; 
     234 
     235        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    233236 
    234237    } 
     
    254257            "}"; 
    255258 
    256         UsabilityDefect[] expectedDefects = new UsabilityDefect[0]; 
    257  
    258         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     259        UsabilitySmell[] expectedSmells = new UsabilitySmell[0]; 
     260 
     261        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    259262 
    260263    } 
     
    276279            "}"; 
    277280 
    278         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    279             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) }; 
    280  
    281         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     281        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     282            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     283                                  TEXT_FIELD_INPUT_RATIO) }; 
     284 
     285        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    282286 
    283287    } 
     
    342346            "}"; 
    343347 
    344         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    345             { new UsabilityDefect(LOW, TEXT_FIELD_INPUT_RATIO) }; 
    346  
    347         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     348        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     349            { new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 
     350                                  TEXT_FIELD_INPUT_RATIO) }; 
     351 
     352        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    348353 
    349354    } 
     
    408413            "}"; 
    409414 
    410         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    411             { new UsabilityDefect(INFO, TEXT_FIELD_INPUT_RATIO) }; 
    412  
    413         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     415        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     416            { new UsabilitySmell(/*INFO*/ UsabilitySmellIntensity.getIntensity(0), 
     417                                  TEXT_FIELD_INPUT_RATIO) }; 
     418 
     419        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    414420    } 
    415421 
     
    430436            "}"; 
    431437 
    432         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    433             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    434               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    435               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS) }; 
    436  
    437         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     438        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     439            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     440                                  TEXT_FIELD_INPUT_RATIO), 
     441              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     442                                  TEXT_FIELD_INPUT_REPETITIONS), 
     443              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     444                                  TEXT_FIELD_INPUT_REPETITIONS) }; 
     445 
     446        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    438447    } 
    439448 
     
    462471            "}"; 
    463472 
    464         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    465             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    466               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    467               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    468               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    469               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    470               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    471               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    472               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    473               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    474               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    475               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    476               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    477               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS) }; 
    478  
    479         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     473        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     474            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     475                                  TEXT_FIELD_INPUT_RATIO), 
     476              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     477                                  TEXT_FIELD_INPUT_REPETITIONS), 
     478              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     479                                  TEXT_FIELD_INPUT_REPETITIONS), 
     480              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     481                                  TEXT_FIELD_INPUT_REPETITIONS), 
     482              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     483                                  TEXT_FIELD_INPUT_REPETITIONS), 
     484              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     485                                  TEXT_FIELD_INPUT_REPETITIONS), 
     486              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     487                                  TEXT_FIELD_INPUT_REPETITIONS), 
     488              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     489                                  TEXT_FIELD_INPUT_REPETITIONS), 
     490              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     491                                  TEXT_FIELD_INPUT_REPETITIONS), 
     492              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     493                                  TEXT_FIELD_INPUT_REPETITIONS), 
     494              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     495                                  TEXT_FIELD_INPUT_REPETITIONS), 
     496              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     497                                  TEXT_FIELD_INPUT_REPETITIONS), 
     498              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     499                                  TEXT_FIELD_INPUT_REPETITIONS) }; 
     500 
     501        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    480502 
    481503    } 
     
    501523            "}"; 
    502524 
    503         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    504             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    505               new UsabilityDefect(MEDIUM, TEXT_FIELD_INPUT_REPETITIONS), 
    506               new UsabilityDefect(MEDIUM, TEXT_FIELD_INPUT_REPETITIONS) }; 
    507  
    508         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     525        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     526            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     527                                  TEXT_FIELD_INPUT_RATIO), 
     528              new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 
     529                                  TEXT_FIELD_INPUT_REPETITIONS), 
     530              new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 
     531                                  TEXT_FIELD_INPUT_REPETITIONS) }; 
     532 
     533        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    509534 
    510535    } 
     
    530555            "}"; 
    531556 
    532         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    533             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    534               new UsabilityDefect(LOW, TEXT_FIELD_INPUT_REPETITIONS), 
    535               new UsabilityDefect(LOW, TEXT_FIELD_INPUT_REPETITIONS) }; 
    536  
    537         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     557        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     558            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     559                                  TEXT_FIELD_INPUT_RATIO), 
     560              new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 
     561                                  TEXT_FIELD_INPUT_REPETITIONS), 
     562              new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 
     563                                  TEXT_FIELD_INPUT_REPETITIONS) }; 
     564 
     565        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    538566 
    539567    } 
     
    565593            "}"; 
    566594 
    567         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    568             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    569               new UsabilityDefect(INFO, TEXT_FIELD_INPUT_REPETITIONS), 
    570               new UsabilityDefect(INFO, TEXT_FIELD_INPUT_REPETITIONS) }; 
    571  
    572         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     595        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     596            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     597                                  TEXT_FIELD_INPUT_RATIO), 
     598              new UsabilitySmell(/*INFO*/ UsabilitySmellIntensity.getIntensity(0), 
     599                                  TEXT_FIELD_INPUT_REPETITIONS), 
     600              new UsabilitySmell(/*INFO*/ UsabilitySmellIntensity.getIntensity(0), 
     601                                  TEXT_FIELD_INPUT_REPETITIONS) }; 
     602 
     603        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    573604 
    574605    } 
     
    595626            "}"; 
    596627 
    597         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    598             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    599               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    600               new UsabilityDefect(MEDIUM, TEXT_FIELD_INPUT_REPETITIONS) }; 
    601  
    602         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     628        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     629            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     630                                  TEXT_FIELD_INPUT_RATIO), 
     631              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     632                                  TEXT_FIELD_INPUT_REPETITIONS), 
     633              new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 
     634                                  TEXT_FIELD_INPUT_REPETITIONS) }; 
     635 
     636        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    603637    } 
    604638 
     
    623657            "}"; 
    624658 
    625         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    626             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    627               new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS), 
    628               new UsabilityDefect(LOW, TEXT_FIELD_INPUT_REPETITIONS) }; 
    629  
    630         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     659        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     660            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     661                                  TEXT_FIELD_INPUT_RATIO), 
     662              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     663                                  TEXT_FIELD_INPUT_REPETITIONS), 
     664              new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 
     665                                  TEXT_FIELD_INPUT_REPETITIONS) }; 
     666 
     667        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    631668    } 
    632669 
     
    646683            "}"; 
    647684 
    648         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    649             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    650               new UsabilityDefect(HIGH, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) }; 
    651  
    652         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     685        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     686            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     687                                  TEXT_FIELD_INPUT_RATIO), 
     688              new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     689                                  TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) }; 
     690 
     691        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    653692 
    654693    } 
     
    669708            "}"; 
    670709 
    671         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    672             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    673               new UsabilityDefect(MEDIUM, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) }; 
    674  
    675         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     710        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     711            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     712                                  TEXT_FIELD_INPUT_RATIO), 
     713              new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 
     714                                  TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) }; 
     715 
     716        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    676717 
    677718    } 
     
    692733            "}"; 
    693734 
    694         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    695             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    696               new UsabilityDefect(LOW, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) }; 
    697  
    698         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     735        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     736            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     737                                  TEXT_FIELD_INPUT_RATIO), 
     738              new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 
     739                                  TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) }; 
     740 
     741        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    699742 
    700743    } 
     
    716759            "}"; 
    717760 
    718         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    719             { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO), 
    720               new UsabilityDefect(INFO, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) }; 
    721  
    722         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     761        UsabilitySmell[] expectedSmells = new UsabilitySmell[] 
     762            { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 
     763                                  TEXT_FIELD_INPUT_RATIO), 
     764              new UsabilitySmell(/*INFO*/ UsabilitySmellIntensity.getIntensity(0), 
     765                                  TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) }; 
     766 
     767        assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 
    723768 
    724769    } 
Note: See TracChangeset for help on using the changeset viewer.