use of org.teiid.query.function.source.SystemSource in project teiid by teiid.
the class TestFunctionTree method testWalkTree.
/**
* Walk through all functions by metadata and verify that we can look
* each one up by signature
*/
@Test
public void testWalkTree() {
SystemSource source = new SystemSource();
FunctionTree ft = new FunctionTree("foo", source);
Collection<String> categories = ft.getCategories();
for (String category : categories) {
assertTrue(ft.getFunctionsInCategory(category).size() > 0);
}
}
use of org.teiid.query.function.source.SystemSource in project teiid by teiid.
the class TestSystemSource method testValidate.
@Test
public void testValidate() {
SystemSource source = new SystemSource();
// $NON-NLS-1$
ValidatorReport report = new ValidatorReport("Test Report");
FunctionMetadataValidator.validateFunctionMethods(source.getFunctionMethods(), report);
if (report.hasItems()) {
// $NON-NLS-1$
fail("Got validation errors while validating system functions: " + report);
}
}
Aggregations