Taher-Ghaleb opened a new pull request, #11156: URL: https://github.com/apache/camel/pull/11156
I am working on research that investigates test smell refactoring in which we identify alternative implementations of test cases, study how commonly used these refactorings are, and assess how acceptable they are in practice. The first smell is when inappropriate assertions are used, while there exist better alternatives. For example, in [RawMailMessageTest.java](https://github.com/apache/camel/commit/f777f422ea24b21022a89d6a425f5ed0f211b8ea#diff-04960f3b28d9765e85f40286d286eee23603cb949def41f69a79b7af1a65fb0a), I refactored `assertTrue(!headers.isEmpty());` using `assertFalse(headers.isEmpty());` instead. The second smell is known as Assertion Roulette, where a test method has multiple asserts and some or all of them have no explanatory messages, which can sometimes make it difficult to identify which assert has failed. Therefore, I made all asserts in the test methods in [RawMailMessageTest.java](https://github.com/apache/camel/commit/f777f422ea24b21022a89d6a425f5ed0f211b8ea#diff-04960f3b28d9765e85f40286d286eee23603cb949def41f69a79b7af1a65fb0a) have exploratory messages. I would like to get your feedback on these particular test smells and their refactorings. Thanks in advance for your input. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org