ValidationOptions options = getValidationOptions();
options.setCheckLayout(true);
options.setCheckModuleSemantics(true);
options.setCheckReferences(true);
options.setFileType(FileType.PUPPET_ROOT);
BuildResult br = vs.validate(chain, root, options, new File[] { new File(
"/Users/henrik/gitrepos/stackhammer-demo/nodes/foo/") }, SubMonitor.convert(null));
// System.err.println(errorsToString(chain));
StringBuilder builder = new StringBuilder();
builder.append("Diagnostic: A version should be specified.\n");
// builder.append("Diagnostic: Unknown class: 'lsbprovider'\n");
// builder.append("Diagnostic: Can not determine until runtime if this is a valid class reference\n");
// builder.append("Diagnostic: Ambiguous reference to: 'service' \n");
// builder.append("Diagnostic: Ambiguous reference to: 'postfix::pflogsumm' \n");
// builder.append("Diagnostic: Ambiguous reference to: 'common' \n");
// builder.append("Diagnostic: Ambiguous reference to: 'snmp::files' \n");
assertEquals("There should be the expected errors", builder.toString(), errorsToString(chain));
// Get the exports for nodes
AllModuleReferences allModuleReferences = br.getAllModuleReferences();
// Get the map with exports for nodes
Multimap<String, String> restricted = allModuleReferences.getRestricted();
int count = 0;
int numberOfClasses = 0;