@Test void loadConfigurationShouldThrowWhenBucketCountDecrease(EventStore eventStore) { EventsourcingConfigurationManagement testee = createConfigurationManagement(eventStore); testee.registerConfiguration(CassandraMailQueueViewConfiguration.builder() .bucketCount(DEFAULT_BUCKET_COUNT) .updateBrowseStartPace(DEFAULT_UPDATE_PACE) .sliceWindow(ONE_HOUR) .build()); assertThatThrownBy(() -> testee.registerConfiguration(CassandraMailQueueViewConfiguration.builder() .bucketCount(DEFAULT_BUCKET_COUNT - 1) .updateBrowseStartPace(DEFAULT_UPDATE_PACE) .sliceWindow(ONE_HOUR) .build())) .isInstanceOf(IllegalArgumentException.class); }
public void registerConfiguration(CassandraMailQueueViewConfiguration newConfiguration) { Preconditions.checkNotNull(newConfiguration); Mono.from(eventSourcingSystem.dispatch(new RegisterConfigurationCommand(newConfiguration, CONFIGURATION_AGGREGATE_ID))).block(); }
EventsourcingConfigurationManagement { public void registerConfiguration(CassandraMailQueueViewConfiguration newConfiguration) { Preconditions.checkNotNull(newConfiguration); Mono.from(eventSourcingSystem.dispatch(new RegisterConfigurationCommand(newConfiguration, CONFIGURATION_AGGREGATE_ID))).block(); } }
EventsourcingConfigurationManagement { public void registerConfiguration(CassandraMailQueueViewConfiguration newConfiguration) { Preconditions.checkNotNull(newConfiguration); Mono.from(eventSourcingSystem.dispatch(new RegisterConfigurationCommand(newConfiguration, CONFIGURATION_AGGREGATE_ID))).block(); } @Inject  EventsourcingConfigurationManagement(EventStore eventStore); }
EventsourcingConfigurationManagement { public void registerConfiguration(CassandraMailQueueViewConfiguration newConfiguration) { Preconditions.checkNotNull(newConfiguration); Mono.from(eventSourcingSystem.dispatch(new RegisterConfigurationCommand(newConfiguration, CONFIGURATION_AGGREGATE_ID))).block(); } @Inject  EventsourcingConfigurationManagement(EventStore eventStore); void registerConfiguration(CassandraMailQueueViewConfiguration newConfiguration); }
EventsourcingConfigurationManagement { public void registerConfiguration(CassandraMailQueueViewConfiguration newConfiguration) { Preconditions.checkNotNull(newConfiguration); Mono.from(eventSourcingSystem.dispatch(new RegisterConfigurationCommand(newConfiguration, CONFIGURATION_AGGREGATE_ID))).block(); } @Inject  EventsourcingConfigurationManagement(EventStore eventStore); void registerConfiguration(CassandraMailQueueViewConfiguration newConfiguration);  }