@Test void fixMessageInconsistenciesShouldUpdateContextWhenConsistentData() { Context context = new Context(); imapUidDAO.insert(MESSAGE_1).block(); messageIdDAO.insert(MESSAGE_1).block(); testee.fixMessageInconsistencies(context, RunningOptions.DEFAULT).block(); assertThat(context.snapshot()) .isEqualTo(Context.Snapshot.builder() .processedImapUidEntries(1) .processedMessageIdEntries(1) .build()); }
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);  }