use of com.github.mustachejava.MustacheException in project elasticsearch by elastic.
the class MustacheTests method testsUnsupportedTagsJoin.
public void testsUnsupportedTagsJoin() {
MustacheException e = expectThrows(MustacheException.class, () -> compile("{{#join}}{{/join}}"));
assertThat(e.getMessage(), containsString("Mustache function [join] must contain one and only one identifier"));
e = expectThrows(MustacheException.class, () -> compile("{{#join delimiter='a'}}{{/join delimiter='b'}}"));
assertThat(e.getMessage(), containsString("Mismatched start/end tags"));
}
use of com.github.mustachejava.MustacheException in project elasticsearch by elastic.
the class MustacheTests method testsUnsupportedTagsToJson.
public void testsUnsupportedTagsToJson() {
MustacheException e = expectThrows(MustacheException.class, () -> compile("{{#toJson}}{{foo}}{{bar}}{{/toJson}}"));
assertThat(e.getMessage(), containsString("Mustache function [toJson] must contain one and only one identifier"));
e = expectThrows(MustacheException.class, () -> compile("{{#toJson}}{{/toJson}}"));
assertThat(e.getMessage(), containsString("Mustache function [toJson] must contain one and only one identifier"));
}
Aggregations