use of org.openkilda.config.KafkaTopicsConfig in project open-kilda by telstra.
the class KafkaNamingForConfigurationValueProcessorTest method shouldApplyNamingToProvidedValue.
@Test
public void shouldApplyNamingToProvidedValue() {
// given
MapConfigurationSource source = new MapConfigurationSource(ImmutableMap.of("kafka.topic.ctrl", TEST_VALUE));
// when
KafkaTopicsConfig kafkaTopicsConfig = factory.createConfiguration(KafkaTopicsConfig.class, source);
// then
assertEquals(TEST_PREFIX + "_" + TEST_VALUE, kafkaTopicsConfig.getCtrlTopic());
}
use of org.openkilda.config.KafkaTopicsConfig in project open-kilda by telstra.
the class KafkaNamingForConfigurationValueProcessorTest method shouldApplyMappingStrategyToDefaultValue.
@Test
public void shouldApplyMappingStrategyToDefaultValue() {
// given
MapConfigurationSource source = new MapConfigurationSource(emptyMap());
// when
KafkaTopicsConfig kafkaTopicsConfig = factory.createConfiguration(KafkaTopicsConfig.class, source);
// then
assertEquals(TEST_PREFIX + "_kilda.ctrl", kafkaTopicsConfig.getCtrlTopic());
}
Aggregations