Changeset 1918 for trunk/autoquest-core-usability-test/src/test/java/de/ugoe/cs/autoquest/usability/TaskCooccurrenceRuleTest.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/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 }
Note: See TracChangeset
for help on using the changeset viewer.