[
https://issues.apache.org/jira/browse/HDDS-9961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai resolved HDDS-9961.
------------------------------------
Fix Version/s: 1.5.0
Resolution: Done
Thanks [~raju.balpande], [~saivinoj], [~taijuwu], [~wangzhaohui] for
contributing patches to this.
> Add static import for assertions and mocks
> ------------------------------------------
>
> Key: HDDS-9961
> URL: https://issues.apache.org/jira/browse/HDDS-9961
> Project: Apache Ozone
> Issue Type: Improvement
> Components: test
> Reporter: Attila Doroszlai
> Assignee: Attila Doroszlai
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.5.0
>
>
> The goal of this task is to add {{import static}} for all assertions and
> interactions with mocks. Replacing:
> {code}
> Assertions.assert<X>(...) -> assert<X>(...)
> Assertions.fail(...) -> fail(...)
> {code}
> and
> {code}
> Mockito.mock(...) -> mock(...)
> Mockito.verify(...) -> verify(...)
> Mockito.when(...) -> when(...)
> ...
> {code}
> and
> {code}
> ArgumentMatchers.any() -> any()
> ArgumentMatchers.eq() -> eq()
> ArgumentMatchers.matches() -> matches()
> // also:
> // Matchers.<...>()
> {code}
> makes the code more readable (shorter lines, less wrapping).
> (Address one or more modules per subtasks to avoid too big patches.)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]