@Test void fixMailboxInconsistenciesShouldNotAlterStateWhenEmpty() { testee.fixMessageInconsistencies(new Context(), RunningOptions.DEFAULT).block(); SoftAssertions.assertSoftly(softly -> { softly.assertThat(imapUidDAO.retrieveAllMessages().collectList().block()).isEmpty(); softly.assertThat(messageIdDAO.retrieveAllMessages().collectList().block()).isEmpty(); }); }
public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); }
SolveMessageInconsistenciesService { public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); } }
SolveMessageInconsistenciesService { public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); } @Inject  SolveMessageInconsistenciesService(CassandraMessageIdToImapUidDAO messageIdToImapUidDAO, CassandraMessageIdDAO messageIdDAO); }
SolveMessageInconsistenciesService { public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); } @Inject  SolveMessageInconsistenciesService(CassandraMessageIdToImapUidDAO messageIdToImapUidDAO, CassandraMessageIdDAO messageIdDAO); Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions); }
SolveMessageInconsistenciesService { public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); } @Inject  SolveMessageInconsistenciesService(CassandraMessageIdToImapUidDAO messageIdToImapUidDAO, CassandraMessageIdDAO messageIdDAO); Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions);  }