Skip to content

Commit c7e2eb2

Browse files
committed
Use MockEnvironment.withProperty in test
Replace MockEnvironment.setProperty(...) with withProperty(...) in SpringApplicationUtilsTest#testGetLoggingLevel to use the fluent API and correctly set the logging level property for the test.
1 parent 1ffa066 commit c7e2eb2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

microsphere-spring-boot-core/src/test/java/io/microsphere/spring/boot/util/SpringApplicationUtilsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void testLog() {
112112

113113
void testGetLoggingLevel(String level) {
114114
MockEnvironment environment = new MockEnvironment();
115-
environment.setProperty(MICROSPHERE_SPRING_BOOT_LOGGING_LEVEL_PROPERTY_NAME, level);
115+
environment.withProperty(MICROSPHERE_SPRING_BOOT_LOGGING_LEVEL_PROPERTY_NAME, level);
116116
assertEquals(level, getLoggingLevel(environment));
117117
}
118118

0 commit comments

Comments
 (0)