error-prone-support icon indicating copy to clipboard operation
error-prone-support copied to clipboard

Introduce assorted Reactor `StepVerifier` Refaster rules

Open werli opened this issue 2 months ago • 5 comments

Summary

This PR introduces a bunch of rules associated to StepVerifier.Asserations and a trivial StepVerifier rule.


Example

I spotted the following interesting pattern:

Mono.empty()
    .as(StepVerifier::create)
    .expectError(SpecificException.class)
    .verifyThenAssertThat()
    .hasOperatorErrorWithMessage("msg");

Which made me find the interesting StepVerifier#Assertions API. It's quite low-level, and IMO not as straightforward to read and write.

The example itself is most often represented in our code-base using AssertJ's richer API:

Mono.empty()
    .as(StepVerifier::create)
    .verifyErrorSatisfies(t ->
        assertThat(t)
        .isInstanceOf(SpecificException.class)
        .hasMessage("msg"));

Suggested commit message:

Introduce assorted Reactor `StepVerifier` Refaster rules (#1132)

werli avatar Apr 11 '24 20:04 werli

Looks good. No mutations were possible for these changes. Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Apr 11 '24 20:04 github-actions[bot]

Looks good. No mutations were possible for these changes. Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Apr 11 '24 21:04 github-actions[bot]

Looks good. No mutations were possible for these changes. Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Apr 12 '24 07:04 github-actions[bot]

Looks good. No mutations were possible for these changes. Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar Apr 12 '24 17:04 github-actions[bot]

Looks good. No mutations were possible for these changes. Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] avatar May 02 '24 06:05 github-actions[bot]