Skip to content

Commit

Permalink
Add properties utils tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Greffier committed Sep 19, 2023
1 parent d2cee0f commit 4d80b06
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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"));
}
}
5 changes: 5 additions & 0 deletions kstreamplify-core/src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
server:
port: 8080
kafka:
properties:
application.id: appId

0 comments on commit 4d80b06

Please sign in to comment.