Description
Assertions in the form:
assertTrue(<x> == <y>) assertEquals(null, <x>) or assertTrue(<x> == null) assertTrue(<x> != null) assertEquals(<boolean>, <x>)
can be simplified to:
assertEquals(<x>, <y>) assertNull(<x>) assertNotNull(<x>) assertTrue/assertFalse(<x>)
Not only are these simpler, some of them also provide more information in case of failure.
Attachments
Attachments
1.
|
Simplify assertions in hadoop-hdds | Resolved | Attila Doroszlai | ||
2.
|
Simplify assertions in hadoop-ozone unit tests | Resolved | Attila Doroszlai | ||
3.
|
Simplify assertions in integration tests | Resolved | Zhaohui Wang | ||
4.
|
Simplify leftover assertions | Resolved | Attila Doroszlai |