Changeset 1918 for trunk/autoquest-core-usability-test/src/test/java/de/ugoe/cs/autoquest/usability/RequiredInefficientActionsRuleTest.java
- Timestamp:
- 03/12/15 15:50:28 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-test/src/test/java/de/ugoe/cs/autoquest/usability/RequiredInefficientActionsRuleTest.java
r1493 r1918 15 15 package de.ugoe.cs.autoquest.usability; 16 16 17 import static de.ugoe.cs.autoquest.usability.UsabilityDefectDescription.INEFFICIENT_ACTIONS; 18 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.HIGH; 19 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.INFO; 20 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.LOW; 21 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.MEDIUM; 17 import static de.ugoe.cs.autoquest.usability.UsabilitySmellDescription.INEFFICIENT_ACTIONS; 22 18 23 19 import org.junit.Before; 24 20 import org.junit.Test; 25 21 26 import de.ugoe.cs.autoquest.usability.Usability Defect;22 import de.ugoe.cs.autoquest.usability.UsabilitySmell; 27 23 28 24 /** … … 36 32 @Before 37 33 public void setUp() { 38 UsabilityDefectSeverity.defaultCoverageQuantile = 0;34 //UsabilitySmellIntensity.defaultCoverageQuantile = 0; 39 35 } 40 36 … … 53 49 "}"; 54 50 55 // no defectexpected, as interactions do not form tasks56 Usability Defect[] expectedDefects = new UsabilityDefect[] { };57 58 assertUsabilityEvaluationResult(expected Defects, rule.evaluate(createTaskModel(spec)));51 // no smell expected, as interactions do not form tasks 52 UsabilitySmell[] expectedSmells = new UsabilitySmell[] { }; 53 54 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 59 55 60 56 } … … 76 72 "}"; 77 73 78 // no defectexpected, as interactions do not form tasks79 Usability Defect[] expectedDefects = new UsabilityDefect[] { };80 81 assertUsabilityEvaluationResult(expected Defects, rule.evaluate(createTaskModel(spec)));74 // no smell expected, as interactions do not form tasks 75 UsabilitySmell[] expectedSmells = new UsabilitySmell[] { }; 76 77 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 82 78 83 79 } … … 99 95 "}"; 100 96 101 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 102 { new UsabilityDefect(HIGH, INEFFICIENT_ACTIONS) }; 103 104 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 97 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 98 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 99 INEFFICIENT_ACTIONS) }; 100 101 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 105 102 106 103 } … … 122 119 "}"; 123 120 124 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 125 { new UsabilityDefect(HIGH, INEFFICIENT_ACTIONS) }; 126 127 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 121 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 122 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 123 INEFFICIENT_ACTIONS) }; 124 125 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 128 126 129 127 } … … 149 147 "}"; 150 148 151 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 152 { new UsabilityDefect(HIGH, INEFFICIENT_ACTIONS) }; 153 154 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 149 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 150 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 151 INEFFICIENT_ACTIONS) }; 152 153 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 155 154 156 155 } … … 176 175 "}"; 177 176 178 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 179 { new UsabilityDefect(HIGH, INEFFICIENT_ACTIONS) }; 180 181 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 177 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 178 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 179 INEFFICIENT_ACTIONS) }; 180 181 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 182 182 183 183 } … … 202 202 "}"; 203 203 204 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 205 { new UsabilityDefect(LOW, INEFFICIENT_ACTIONS) }; 206 207 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 204 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 205 { new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 206 INEFFICIENT_ACTIONS) }; 207 208 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 208 209 209 210 } … … 237 238 "}"; 238 239 239 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 240 { new UsabilityDefect(MEDIUM, INEFFICIENT_ACTIONS) }; 241 242 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 240 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 241 { new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 242 INEFFICIENT_ACTIONS) }; 243 244 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 243 245 244 246 } … … 272 274 "}"; 273 275 274 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 275 { new UsabilityDefect(MEDIUM, INEFFICIENT_ACTIONS) }; 276 277 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 276 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 277 { new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 278 INEFFICIENT_ACTIONS) }; 279 280 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 278 281 279 282 } … … 311 314 "}"; 312 315 313 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 314 { new UsabilityDefect(LOW, INEFFICIENT_ACTIONS) }; 315 316 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 316 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 317 { new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 318 INEFFICIENT_ACTIONS) }; 319 320 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 317 321 318 322 } … … 350 354 "}"; 351 355 352 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 353 { new UsabilityDefect(LOW, INEFFICIENT_ACTIONS) }; 354 355 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 356 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 357 { new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 358 INEFFICIENT_ACTIONS) }; 359 360 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 356 361 357 362 } … … 387 392 "}"; 388 393 389 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 390 { new UsabilityDefect(INFO, INEFFICIENT_ACTIONS) }; 391 392 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 394 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 395 { new UsabilitySmell(/*INFO*/ UsabilitySmellIntensity.getIntensity(0), 396 INEFFICIENT_ACTIONS) }; 397 398 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 393 399 394 400 } … … 424 430 "}"; 425 431 426 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 427 { new UsabilityDefect(INFO, INEFFICIENT_ACTIONS) }; 428 429 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 432 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 433 { new UsabilitySmell(/*INFO*/ UsabilitySmellIntensity.getIntensity(0), 434 INEFFICIENT_ACTIONS) }; 435 436 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 430 437 431 438 } … … 477 484 "}"; 478 485 479 Usability Defect[] expectedDefects = new UsabilityDefect[] { };480 481 assertUsabilityEvaluationResult(expected Defects, rule.evaluate(createTaskModel(spec)));486 UsabilitySmell[] expectedSmells = new UsabilitySmell[] { }; 487 488 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 482 489 483 490 } … … 529 536 "}"; 530 537 531 Usability Defect[] expectedDefects = new UsabilityDefect[] { };532 533 assertUsabilityEvaluationResult(expected Defects, rule.evaluate(createTaskModel(spec)));538 UsabilitySmell[] expectedSmells = new UsabilitySmell[] { }; 539 540 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 534 541 535 542 }
Note: See TracChangeset
for help on using the changeset viewer.