use of com.querydsl.core.types.Templates 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.Templates in project querydsl by querydsl.
the class TemplatesTestBase method default_instance.
@Test
public void default_instance() {
Set<Class<? extends Templates>> templates = querydsl.getSubTypesOf(Templates.class);
Set<Class<? extends Templates>> moduleSpecific = getAll(templates, MODULE_SPECIFIC);
for (Class<? extends Templates> template : moduleSpecific) {
try {
Templates defaultInstance = (Templates) template.getField("DEFAULT").get(null);
errorCollector.checkThat(defaultInstance, instanceOf(template));
} catch (Exception ex) {
errorCollector.addError(ex);
}
}
}
Aggregations