mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
Merge pull request #992 from looly/revert-991-test_improvement
Revert "Test improvement: removed assertion roulette (test smell)"
This commit is contained in:
commit
64bf5bc68e
@ -21,16 +21,15 @@ import java.io.IOException;
|
||||
public class BeetlUtilTest {
|
||||
|
||||
@Test
|
||||
public void renderTest() throws IOException {
|
||||
public void renderStrTest() throws IOException {
|
||||
GroupTemplate groupTemplate = BeetlUtil.createGroupTemplate(new StringTemplateResourceLoader(), Configuration.defaultConfiguration());
|
||||
Template template = BeetlUtil.getTemplate(groupTemplate, "hello,${name}");
|
||||
String result = BeetlUtil.render(template, Dict.create().set("name", "hutool"));
|
||||
Assert.assertEquals("hello,hutool", result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void renderFromStrTest() {
|
||||
Assert.assertEquals("hello,hutool", result);
|
||||
|
||||
String renderFromStr = BeetlUtil.renderFromStr("hello,${name}", Dict.create().set("name", "hutool"));
|
||||
Assert.assertEquals("hello,hutool", renderFromStr);
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user