error-prone-support
error-prone-support copied to clipboard
Introduce assorted Reactor `StepVerifier` Refaster rules
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)
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.
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.
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.
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.
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.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code