@Test void loadConfigurationShouldIgnoreDuplicateWhenStoreTheSameConfigurationTwice(EventStore eventStore) { EventsourcingConfigurationManagement testee = createConfigurationManagement(eventStore); testee.registerConfiguration(FIRST_CONFIGURATION); testee.registerConfiguration(FIRST_CONFIGURATION); assertThat(Mono.from(eventStore.getEventsOfAggregate(CONFIGURATION_AGGREGATE_ID)) .block() .getEventsJava()) .hasSize(1); }
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);  }