use of com.querydsl.core.types.JavaTemplates in project querydsl by querydsl.
the class JavaTemplatesTest method mappings.
@Test
public void mappings() {
Templates templates = new JavaTemplates();
int matched = 0;
for (Operator operator : Ops.values()) {
++matched;
assertNotNull(templates.getTemplate(operator));
}
assertTrue(matched > 0);
}
use of com.querydsl.core.types.JavaTemplates in project querydsl by querydsl.
the class SerializerBaseTest method test.
@Test
public void test() {
DummySerializer serializer = new DummySerializer(new JavaTemplates());
StringPath strPath = Expressions.stringPath("str");
// path
serializer.handle(strPath);
// operation
serializer.handle(strPath.isNotNull());
// long path
serializer.handle(new PathBuilder<Object>(Object.class, "p").getList("l", Map.class).get(0));
// constant
serializer.handle(ConstantImpl.create(""));
// custom
serializer.handle(ExpressionUtils.template(Object.class, "xxx", ConstantImpl.create("")));
}
Aggregations