Understanding API library usage in checkstyle #12896
Replies: 1 comment 2 replies
-
I believe it was because of the readability in the assertion failure messages, but it doesn't really matter. One form of writting tests is prohibited, because we want everything to be written in the library we have chosen. We want everything in the codebase going in a single direction and style.
I don't know the exact imports we support and don't. I do know we preferred the writing that is allowed with some throw assertions and that is why they are allowed. I assume our import control details what is allowed and what isn't. If you think something should be forbidden and isn't, I suggest making an issue for it. |
Beta Was this translation helpful? Give feedback.
-
Identified at #12888 (comment) and #12888 (comment)
Question 1.1
Writing tests using the jupiter assertion library is prohibited in checkstyle codebase? Why? Rather Truth assertion library was emphasized.
(I think it is because code readability is increased in Truth testing library but I still need to be clear)
Question 1.2
Is it just that jupiter assert api is prohibited to be used or the whole jupiter testing library is prohibited to be used and there is a requirement for the current jupiter based testing to migrate and use Truth testing library (image below shows jupiter testing library being used by checkstyle)
Beta Was this translation helpful? Give feedback.
All reactions