[ 
https://issues.apache.org/jira/browse/HDDS-9961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Doroszlai updated HDDS-9961:
-----------------------------------
    Description: 
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.)

  was:
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.<...>()
// CoreMatchers.<...>()
{code}

makes the code more readable (shorter lines, less wrapping).

(Address one or more modules per subtasks to avoid too big patches.)


> 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
>            Priority: Major
>
> 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]

Reply via email to