@Test
public void relativeAmbiguityErrorReport() throws Exception {
File root = TestDataProvider.getTestFile(new Path("testData/ambiguity/"));
ValidationService vs = getValidationService();
Diagnostic chain = new Diagnostic();
ValidationOptions options = getValidationOptions();
options.setCheckLayout(false);
options.setCheckModuleSemantics(false);
options.setCheckReferences(true);
options.setFileType(FileType.MODULE_ROOT);
vs.validate(chain, root, options, null, SubMonitor.convert(null));
assertContainsErrorCode(chain, IPPDiagnostics.ISSUE__RESOURCE_AMBIGUOUS_REFERENCE);
assertTrue(
"Message text should contain a relative reference",
chain.getChildren().get(0).getMessage().startsWith("Ambiguous reference to: 'fluff' found in: 1 resource [") &&
chain.getChildren().get(0).getMessage().contains("manifests/ambigA.pp"));
}