diff --git a/kstreamplify-core/src/test/java/com/michelin/kstreamplify/properties/PropertiesUtilsTest.java b/kstreamplify-core/src/test/java/com/michelin/kstreamplify/properties/PropertiesUtilsTest.java new file mode 100644 index 00000000..7e61a16d --- /dev/null +++ b/kstreamplify-core/src/test/java/com/michelin/kstreamplify/properties/PropertiesUtilsTest.java @@ -0,0 +1,28 @@ +package com.michelin.kstreamplify.properties; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.Properties; +import org.junit.jupiter.api.Test; + +class PropertiesUtilsTest { + + @Test + void shouldLoadProperties() { + Properties properties = PropertiesUtils.loadProperties(); + + assertTrue(properties.containsKey("server.port")); + assertTrue(properties.containsValue(8080)); + + assertTrue(properties.containsKey("kafka.properties.application.id")); + assertTrue(properties.containsValue("appId")); + } + + @Test + void shouldLoadKafkaProperties() { + Properties properties = PropertiesUtils.loadKafkaProperties(PropertiesUtils.loadProperties()); + + assertTrue(properties.containsKey("application.id")); + assertTrue(properties.containsValue("appId")); + } +} diff --git a/kstreamplify-core/src/test/resources/application.yml b/kstreamplify-core/src/test/resources/application.yml new file mode 100644 index 00000000..434274e2 --- /dev/null +++ b/kstreamplify-core/src/test/resources/application.yml @@ -0,0 +1,5 @@ +server: + port: 8080 +kafka: + properties: + application.id: appId