Justin Bertram created ARTEMIS-5291:
---------------------------------------
Summary: Simplify assertions
Key: ARTEMIS-5291
URL: https://issues.apache.org/jira/browse/ARTEMIS-5291
Project: ActiveMQ Artemis
Issue Type: Sub-task
Reporter: Justin Bertram
Assignee: Justin Bertram
Lots of tests contain assertions that can be simplified. The simplified
assertions increase code readability and produce clearer error messages when
they fail. Here are some examples:
||Example||Replacement||
|{{assertEquals(true, x());}}|{{assertTrue(x());}}|
|{{assertTrue(y() != null);}}|{{assertNotNull(y());}}|
|{{assertTrue(z == z());}}|{{assertSame(z, z());}}|
|{{assertTrue(a.equals(a()));}}|{{assertEquals(a, a());}}|
|{{assertTrue(false);}}|{{fail();}}|
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact