TestSmellDetector
TestSmellDetector copied to clipboard
[AssertionRoulette] Handle Assertj's methods `Descriptable.as` and `AbstractAssert.withFailMessage`
As discussed in a stackoverflow question. AssertJ's assertions differ from builtin Junit's assertions as they don't have third or second parameters for descriptions. Instead, they offer the Descriptable.as and AbstractAssert.withFailMessage methods.
On the other hand, TSDetect's AssertionRoulette implementation ( at /src/main/java/testsmell/smell/AssertionRoulette.java) handles an homonymous assertion from Junit 4 (assertThat) which is deprecated. For projects using AssertJ, this could raise the false impression that test methods using Descriptable.as or AbstractAssert.withFailMessage are description-less.