[
https://issues.apache.org/jira/browse/ARTEMIS-5291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17924179#comment-17924179
]
ASF subversion and git services commented on ARTEMIS-5291:
----------------------------------------------------------
Commit 54f93c7e773ddb7beea6aafb936273f3745a1644 in activemq-artemis's branch
refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=54f93c7e77 ]
ARTEMIS-5291 simplify assertions
> 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
>
> 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