Skip to content

Commit 8febfa8

Browse files
committed
Add test for cameCalse properties
Signed-off-by: Matheus Cruz <[email protected]>
1 parent 7afaa1b commit 8febfa8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

dapr-spring/dapr-spring-boot-autoconfigure/src/test/java/io/dapr/spring/boot/autoconfigure/client/DaprClientPropertiesTest.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,26 @@ public void shouldMapDaprClientProperties() {
8383
});
8484

8585
});
86+
}
8687

88+
@Test
89+
@DisplayName("Should map DaprClient properties correctly (camelCase)")
90+
public void shouldMapDaprClientPropertiesCamelCase() {
91+
runner.withSystemProperties(
92+
"dapr.client.httpEndpoint=http://localhost",
93+
"dapr.client.httpPort=3500",
94+
"dapr.client.grpcEndpoint=localhost",
95+
"dapr.client.grpcPort=50001"
96+
).run(context -> {
97+
DaprClientProperties properties = context.getBean(DaprClientProperties.class);
98+
SoftAssertions.assertSoftly(softly -> {
99+
softly.assertThat(properties.getGrpcEndpoint()).isEqualTo("localhost");
100+
softly.assertThat(properties.getHttpEndpoint()).isEqualTo("http://localhost");
101+
softly.assertThat(properties.getHttpPort()).isEqualTo(3500);
102+
softly.assertThat(properties.getGrpcPort()).isEqualTo(50001);
103+
});
104+
105+
});
87106
}
88107

89108
@EnableConfigurationProperties(DaprClientProperties.class)

0 commit comments

Comments
 (0)