Hi Andrei,
thanks for your answer. I understand that you don't want to add parameters to that rule, but maybe add a generic extension mechanism, so that it can pick up future (and internal) test frameworks?
For example we have a custom compareTester (tries to verify the comparable contract):
CompareToTester.forClass (Integer.class)
.forceEqualsConsistency (true)
.addSortedLessInstances (new Integer (1), new Integer (2), new Integer (3))
.addEqualInstances (new Integer (4), new Integer (4))
.addSortedGreaterInstances (new Integer (5), new Integer (6), new Integer (7))
.testCompareTo ();
I wouldn't mind adding an annotation to the testCompareTo method to designate it as an assertion-type method. Maybe have some kind of @Assertion annotation, which I could add to our internal test classes/methods and future open source test frameworks can use to tag their assertion method/classes, so you don't have to maintain the list in Sonar-Java?
Regards, Tobias