[
https://issues.apache.org/jira/browse/ARTEMIS-5291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robbie Gemmell resolved ARTEMIS-5291.
-------------------------------------
Fix Version/s: 2.40.0
Resolution: Fixed
> 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
> Priority: Major
> Fix For: 2.40.0
>
>
> 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