Skip to content

Files

Latest commit

 

History

History
13 lines (7 loc) · 541 Bytes

UseAssertNullInsteadOfAssertEquals.md

File metadata and controls

13 lines (7 loc) · 541 Bytes

Pattern: assertEquals() with null

Issue: -

Description

This rule detects JUnit calling assertEquals where the first or second parameter is null. These assertion should be made against the assertNull method instead.

This rule sets the default value of the applyToClassNames property to only match class names ending in 'Test', 'Tests' or 'TestCase'.

Further Reading