use of cn.hutool.core.lang.Dict in project hutool by dromara.
the class YamlUtilTest method loadByPathTest.
@Test
public void loadByPathTest() {
final Dict result = YamlUtil.loadByPath("test.yaml");
Assert.assertEquals("John", result.getStr("firstName"));
final List<Integer> numbers = result.getByPath("contactDetails.number");
Assert.assertEquals(123456789, (int) numbers.get(0));
Assert.assertEquals(456786868, (int) numbers.get(1));
}
use of cn.hutool.core.lang.Dict in project hutool by dromara.
the class YamlUtilTest method dumpTest.
@Test
@Ignore
public void dumpTest() {
final Dict dict = Dict.create().set("name", "hutool").set("count", 1000);
YamlUtil.dump(dict, FileUtil.getWriter("d:/test/dump.yaml", CharsetUtil.CHARSET_UTF_8, false));
}
use of cn.hutool.core.lang.Dict in project SpringBoot-Learning by kong0827.
the class TestControllerTest method test.
@Test
public void test() throws InterruptedException {
ExecutorService executorService = Executors.newFixedThreadPool(10);
for (int i = 0; i < 30; i++) {
executorService.submit(() -> {
Dict dict = testController.test1();
System.out.println(dict);
});
}
}
Aggregations