arieslab / jnose

JNose - Java TestSmells Detection
GNU General Public License v3.0
20 stars 8 forks source link

Redundant Assertion #21

Closed danielevalverde closed 3 years ago

luana-martins commented 4 years ago

Description: Redundant Assertion (RA) smell occurs when test methods contain assertion statements that are either always true or always false. RA is introduced by developers for debugging purposes and then forgotten.

Detection. Assertion statement in which the expected and actual parameters are the same.

Problem. Only one RA is detected in the test method, even if the test method has multiple assertions with the same expected and actual parameters. Fix the test smell detection to count each of its instances and to point the line location.