use of org.reflections.scanners.MemberUsageScanner in project flink by apache.
the class CheckForbiddenMethodsUsage method testNoDefaultEncoding.
@Test
public void testNoDefaultEncoding() throws Exception {
final Reflections reflections = new Reflections(new ConfigurationBuilder().useParallelExecutor(Runtime.getRuntime().availableProcessors()).addUrls(ClasspathHelper.forPackage("org.apache.flink")).addScanners(new MemberUsageScanner()));
for (ForbiddenCall forbiddenCall : forbiddenCalls) {
final Set<Member> methodUsages = forbiddenCall.getUsages(reflections);
methodUsages.removeAll(forbiddenCall.getExclusions());
assertEquals("Unexpected calls: " + methodUsages, 0, methodUsages.size());
}
}
Aggregations