Changeset 1918 for trunk/autoquest-core-usability-test/src
- Timestamp:
- 03/12/15 15:50:28 (10 years ago)
- Location:
- trunk/autoquest-core-usability-test/src/test/java/de/ugoe/cs/autoquest/usability
- Files:
-
- 3 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-test/src/test/java/de/ugoe/cs/autoquest/usability/AbstractUsabilityEvaluationTC.java
r1427 r1918 73 73 * 74 74 */ 75 protected void assertUsabilityEvaluationResult(Usability Defect[] expectedDefects,75 protected void assertUsabilityEvaluationResult(UsabilitySmell[] expectedSmells, 76 76 UsabilityEvaluationResult evaluationResult) 77 77 { 78 assertEquals(evaluationResult.getAll Defects().toString(),79 expected Defects.length, evaluationResult.getAllDefects().size());78 assertEquals(evaluationResult.getAllSmells().toString(), 79 expectedSmells.length, evaluationResult.getAllSmells().size()); 80 80 81 81 EXPECTED_DEFECT_ITERATION: 82 for (Usability Defect expectedDefect : expectedDefects) {83 for (Usability Defect defect : evaluationResult.getAllDefects()) {84 if (expected Defect.equals(defect)) {85 System.err.println( defect.getParameterizedDescription());82 for (UsabilitySmell expectedSmell : expectedSmells) { 83 for (UsabilitySmell smell : evaluationResult.getAllSmells()) { 84 if (expectedSmell.equals(smell)) { 85 System.err.println(smell.getParameterizedDescription()); 86 86 continue EXPECTED_DEFECT_ITERATION; 87 87 } 88 88 } 89 89 90 for (Usability Defect defect : evaluationResult.getAllDefects()) {91 System.err.println( defect);90 for (UsabilitySmell smell : evaluationResult.getAllSmells()) { 91 System.err.println(smell); 92 92 } 93 93 94 fail("expected defect " + expectedDefect+ " not found in evaluation result");94 fail("expected smell " + expectedSmell + " not found in evaluation result"); 95 95 } 96 96 } -
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 } -
trunk/autoquest-core-usability-test/src/test/java/de/ugoe/cs/autoquest/usability/TaskCooccurrenceRuleTest.java
r1493 r1918 15 15 package de.ugoe.cs.autoquest.usability; 16 16 17 import static de.ugoe.cs.autoquest.usability.UsabilityDefectDescription.COOCCURENCE_PRECED; 18 import static de.ugoe.cs.autoquest.usability.UsabilityDefectDescription.COOCCURENCE_SUCCEED; 19 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.HIGH; 20 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.INFO; 21 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.LOW; 22 import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.MEDIUM; 17 import static de.ugoe.cs.autoquest.usability.UsabilitySmellDescription.COOCCURENCE_PRECED; 18 import static de.ugoe.cs.autoquest.usability.UsabilitySmellDescription.COOCCURENCE_SUCCEED; 23 19 24 20 import org.junit.Before; 25 21 import org.junit.Test; 26 22 27 import de.ugoe.cs.autoquest.usability.Usability Defect;23 import de.ugoe.cs.autoquest.usability.UsabilitySmell; 28 24 29 25 /** … … 37 33 @Before 38 34 public void setUp() { 39 UsabilityDefectSeverity.defaultCoverageQuantile = 0;35 //UsabilitySmellIntensity.defaultCoverageQuantile = 0; 40 36 } 41 37 … … 54 50 "}"; 55 51 56 // no defectexpected, as interactions do not form tasks57 Usability Defect[] expectedDefects = new UsabilityDefect[] { };58 59 assertUsabilityEvaluationResult(expected Defects, rule.evaluate(createTaskModel(spec)));52 // no smell expected, as interactions do not form tasks 53 UsabilitySmell[] expectedSmells = new UsabilitySmell[] { }; 54 55 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 60 56 61 57 } … … 77 73 "}"; 78 74 79 // no defectexpected, as interactions do not form tasks80 Usability Defect[] expectedDefects = new UsabilityDefect[] { };81 82 assertUsabilityEvaluationResult(expected Defects, rule.evaluate(createTaskModel(spec)));75 // no smell expected, as interactions do not form tasks 76 UsabilitySmell[] expectedSmells = new UsabilitySmell[] { }; 77 78 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 83 79 84 80 } … … 100 96 "}"; 101 97 102 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 103 { new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 104 new UsabilityDefect(HIGH, COOCCURENCE_PRECED) }; 105 106 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 98 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 99 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 100 COOCCURENCE_SUCCEED), 101 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 102 COOCCURENCE_PRECED) }; 103 104 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 107 105 108 106 } … … 128 126 "}"; 129 127 130 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 131 { new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 132 new UsabilityDefect(HIGH, COOCCURENCE_PRECED) }; 133 134 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 128 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 129 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 130 COOCCURENCE_SUCCEED), 131 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 132 COOCCURENCE_PRECED) }; 133 134 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 135 135 136 136 } … … 155 155 "}"; 156 156 157 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 158 { new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 159 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 160 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 161 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 162 new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 163 new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 164 new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 165 new UsabilityDefect(HIGH, COOCCURENCE_PRECED) }; 166 167 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 157 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 158 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 159 COOCCURENCE_SUCCEED), 160 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 161 COOCCURENCE_SUCCEED), 162 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 163 COOCCURENCE_SUCCEED), 164 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 165 COOCCURENCE_SUCCEED), 166 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 167 COOCCURENCE_PRECED), 168 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 169 COOCCURENCE_PRECED), 170 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 171 COOCCURENCE_PRECED), 172 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 173 COOCCURENCE_PRECED) }; 174 175 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 168 176 169 177 } … … 193 201 "}"; 194 202 195 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 196 { new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 197 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 198 new UsabilityDefect(LOW, COOCCURENCE_PRECED), 199 new UsabilityDefect(INFO, COOCCURENCE_PRECED) }; 200 201 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 203 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 204 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 205 COOCCURENCE_SUCCEED), 206 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 207 COOCCURENCE_SUCCEED), 208 new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 209 COOCCURENCE_PRECED), 210 new UsabilitySmell(/*INFO*/ UsabilitySmellIntensity.getIntensity(0), 211 COOCCURENCE_PRECED) }; 212 213 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 202 214 203 215 } … … 227 239 "}"; 228 240 229 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 230 { new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 231 new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 232 new UsabilityDefect(LOW, COOCCURENCE_SUCCEED), 233 new UsabilityDefect(INFO, COOCCURENCE_SUCCEED) }; 234 235 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 241 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 242 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 243 COOCCURENCE_PRECED), 244 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 245 COOCCURENCE_PRECED), 246 new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 247 COOCCURENCE_SUCCEED), 248 new UsabilitySmell(/*INFO*/ UsabilitySmellIntensity.getIntensity(0), 249 COOCCURENCE_SUCCEED) }; 250 251 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 236 252 237 253 } … … 265 281 "}"; 266 282 267 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 268 { new UsabilityDefect(LOW, COOCCURENCE_PRECED), 269 new UsabilityDefect(LOW, COOCCURENCE_PRECED), 270 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 271 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED) }; 272 273 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 283 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 284 { new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 285 COOCCURENCE_PRECED), 286 new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 287 COOCCURENCE_PRECED), 288 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 289 COOCCURENCE_SUCCEED), 290 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 291 COOCCURENCE_SUCCEED) }; 292 293 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 274 294 275 295 } … … 303 323 "}"; 304 324 305 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 306 { new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 307 new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 308 new UsabilityDefect(LOW, COOCCURENCE_SUCCEED), 309 new UsabilityDefect(LOW, COOCCURENCE_SUCCEED) }; 310 311 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 325 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 326 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 327 COOCCURENCE_PRECED), 328 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 329 COOCCURENCE_PRECED), 330 new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 331 COOCCURENCE_SUCCEED), 332 new UsabilitySmell(/*LOW*/ UsabilitySmellIntensity.getIntensity(0), 333 COOCCURENCE_SUCCEED) }; 334 335 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 312 336 313 337 } … … 341 365 "}"; 342 366 343 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 344 { new UsabilityDefect(MEDIUM, COOCCURENCE_PRECED), 345 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 346 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED) }; 347 348 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 367 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 368 { new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 369 COOCCURENCE_PRECED), 370 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 371 COOCCURENCE_SUCCEED), 372 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 373 COOCCURENCE_SUCCEED) }; 374 375 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 349 376 350 377 } … … 378 405 "}"; 379 406 380 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 381 { new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 382 new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 383 new UsabilityDefect(MEDIUM, COOCCURENCE_SUCCEED) }; 384 385 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 407 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 408 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 409 COOCCURENCE_PRECED), 410 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 411 COOCCURENCE_PRECED), 412 new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 413 COOCCURENCE_SUCCEED) }; 414 415 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 386 416 387 417 } … … 431 461 "}"; 432 462 433 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 434 { new UsabilityDefect(MEDIUM, COOCCURENCE_PRECED), 435 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED), 436 new UsabilityDefect(HIGH, COOCCURENCE_SUCCEED) }; 437 438 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 463 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 464 { new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 465 COOCCURENCE_PRECED), 466 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 467 COOCCURENCE_SUCCEED), 468 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 469 COOCCURENCE_SUCCEED) }; 470 471 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 439 472 440 473 } … … 484 517 "}"; 485 518 486 UsabilityDefect[] expectedDefects = new UsabilityDefect[] 487 { new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 488 new UsabilityDefect(HIGH, COOCCURENCE_PRECED), 489 new UsabilityDefect(MEDIUM, COOCCURENCE_SUCCEED) }; 490 491 assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 519 UsabilitySmell[] expectedSmells = new UsabilitySmell[] 520 { new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 521 COOCCURENCE_PRECED), 522 new UsabilitySmell(/*HIGH*/ UsabilitySmellIntensity.getIntensity(0), 523 COOCCURENCE_PRECED), 524 new UsabilitySmell(/*MEDIUM*/ UsabilitySmellIntensity.getIntensity(0), 525 COOCCURENCE_SUCCEED) }; 526 527 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 492 528 493 529 } -
trunk/autoquest-core-usability-test/src/test/java/de/ugoe/cs/autoquest/usability/TextInputStatisticsRuleTest.java
r1335 r1918 15 15 package de.ugoe.cs.autoquest.usability; 16 16 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; 17 import static de.ugoe.cs.autoquest.usability.UsabilitySmellDescription.TEXT_FIELD_INPUT_RATIO; 18 import static de.ugoe.cs.autoquest.usability.UsabilitySmellDescription.TEXT_FIELD_INPUT_REPETITIONS; 19 import static de.ugoe.cs.autoquest.usability.UsabilitySmellDescription.TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO; 24 20 25 21 import org.junit.Test; 26 22 27 import de.ugoe.cs.autoquest.usability.Usability Defect;23 import de.ugoe.cs.autoquest.usability.UsabilitySmell; 28 24 29 25 /** … … 45 41 "}"; 46 42 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))); 51 48 52 49 } … … 68 65 "}"; 69 66 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))); 74 72 75 73 } … … 92 90 "}"; 93 91 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))); 98 97 99 98 } … … 115 114 "}"; 116 115 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))); 121 121 122 122 } … … 177 177 "}"; 178 178 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))); 183 184 } 184 185 … … 202 203 "}"; 203 204 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))); 208 210 } 209 211 … … 227 229 "}"; 228 230 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))); 233 236 234 237 } … … 254 257 "}"; 255 258 256 Usability Defect[] expectedDefects = new UsabilityDefect[0];257 258 assertUsabilityEvaluationResult(expected Defects, rule.evaluate(createTaskModel(spec)));259 UsabilitySmell[] expectedSmells = new UsabilitySmell[0]; 260 261 assertUsabilityEvaluationResult(expectedSmells, rule.evaluate(createTaskModel(spec))); 259 262 260 263 } … … 276 279 "}"; 277 280 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))); 282 286 283 287 } … … 342 346 "}"; 343 347 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))); 348 353 349 354 } … … 408 413 "}"; 409 414 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))); 414 420 } 415 421 … … 430 436 "}"; 431 437 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))); 438 447 } 439 448 … … 462 471 "}"; 463 472 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))); 480 502 481 503 } … … 501 523 "}"; 502 524 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))); 509 534 510 535 } … … 530 555 "}"; 531 556 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))); 538 566 539 567 } … … 565 593 "}"; 566 594 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))); 573 604 574 605 } … … 595 626 "}"; 596 627 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))); 603 637 } 604 638 … … 623 657 "}"; 624 658 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))); 631 668 } 632 669 … … 646 683 "}"; 647 684 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))); 653 692 654 693 } … … 669 708 "}"; 670 709 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))); 676 717 677 718 } … … 692 733 "}"; 693 734 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))); 699 742 700 743 } … … 716 759 "}"; 717 760 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))); 723 768 724 769 } -
trunk/autoquest-core-usability-test/src/test/java/de/ugoe/cs/autoquest/usability/UsabilitySmellDescriptionTest.java
r1493 r1918 25 25 import org.junit.Test; 26 26 27 import de.ugoe.cs.autoquest.usability.Usability DefectDescription;27 import de.ugoe.cs.autoquest.usability.UsabilitySmellDescription; 28 28 29 29 /** 30 30 * @author Patrick Harms 31 31 */ 32 public class Usability DefectDescriptionTest {32 public class UsabilitySmellDescriptionTest { 33 33 34 34 /** … … 37 37 @Test 38 38 public void testInitialization() { 39 for (Usability DefectDescription description : UsabilityDefectDescription.values()) {39 for (UsabilitySmellDescription description : UsabilitySmellDescription.values()) { 40 40 assertNotNull(description.toString()); 41 41 assertNotSame("", description.toString()); … … 49 49 @Test 50 50 public void testParameterization_01() { 51 for (Usability DefectDescription description : UsabilityDefectDescription.values()) {51 for (UsabilitySmellDescription description : UsabilitySmellDescription.values()) { 52 52 Map<String, Object> parameters = new HashMap<String, Object>(); 53 53 … … 68 68 @Test 69 69 public void testParameterization_02() { 70 for (Usability DefectDescription description : UsabilityDefectDescription.values()) {70 for (UsabilitySmellDescription description : UsabilitySmellDescription.values()) { 71 71 Map<String, Object> parameters = new HashMap<String, Object>(); 72 72
Note: See TracChangeset
for help on using the changeset viewer.