mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package org.dromara.hutool.setting;
|
||||
|
||||
import org.dromara.hutool.core.io.resource.ResourceUtil;
|
||||
import org.dromara.hutool.core.util.CharsetUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class IssueIB1I8PTest {
|
||||
@Test
|
||||
void loadTest() {
|
||||
final SettingLoader loader = new SettingLoader(CharsetUtil.UTF_8, true);
|
||||
loader.setValueEditor((group, key, value)->{
|
||||
if("pass".equals(key)){
|
||||
return "pass" + value;
|
||||
}
|
||||
return value;
|
||||
});
|
||||
final Setting setting = new Setting(ResourceUtil.getResource("test.setting"), loader);
|
||||
Assertions.assertEquals("pass123456", setting.getStrByGroup("pass", "demo"));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user