If you don’t have the way/right to update QualityProfile (ex. shared quality profile…),
then there is another way/workaround to include project dedicated test assertions.
You will have to rename your custom assert methods with at least one keyword detected by sonar.
This post with C# issue were very usefull for me (and this works in another langage like java too.)
https://community.sonarsource.com/t/how-to-mark-custom-methods-as-assertion-methods-in-c/31437
The detection of assertions is based on string comparation. If the method name contains any of these keywords (case insensitive), then it’s considered to be an assertion:
- ASSERT
- CHECK
- EXPECT
- MUST
- SHOULD
- VERIFY
- VALIDATE