arieslab / jnose

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

Fix Sensitive Equality #28

Closed luana-martins closed 3 years ago

luana-martins commented 3 years ago

Description. Sensitive Equality (SE) occurs when the toString method is used within a test method. Test methods verify objects by invoking the default toString() method of the object and comparing the output against an specific string. Changes to the implementation of toString() might result in failure. The correct approach is to implement a custom method within the object to perform this comparison.

Detection: A test method invokes the toString() method of an object.

Problem. The detection should indicate the line where the method toString() is being called.