This commit is contained in:
Looly
2023-12-19 02:45:22 +08:00
parent 4b83504e50
commit 494c70b9e6
27 changed files with 796 additions and 1032 deletions

View File

@@ -88,7 +88,7 @@ public class PropsTest {
Assertions.assertEquals(DateUtil.parse("2020-01-01"), systemConfig.getCreateTime());
Assertions.assertEquals(true, systemConfig.getIsInit());
Assertions.assertEquals("1", systemConfig.getStairPlan());
Assertions.assertEquals(new Integer(2), systemConfig.getStageNum());
Assertions.assertEquals(Integer.valueOf(2), systemConfig.getStageNum());
Assertions.assertEquals("3", systemConfig.getVersion());
}
@@ -124,5 +124,16 @@ public class PropsTest {
private Date nextStageTime;//当前阶段结束日期/下一阶段开始日期
}
@Test
void getSubTest() {
final Props props = new Props();
props.set("a.b", "1");
props.set("a.c", "2");
props.set("b.a", "3");
final Props subProps = props.getSubProps("a");
Assertions.assertEquals(2, subProps.size());
Assertions.assertEquals("1", subProps.getStr("b"));
Assertions.assertEquals("2", subProps.getStr("c"));
}
}