EList<Resource.Diagnostic> _errors = _eResource.getErrors();
boolean _isEmpty = _errors.isEmpty();
Assert.assertTrue(_isEmpty);
TargetPlatformValidator _validator = tester.validator();
_validator.checkSameIDForAllLocationWithSameURI(tpa);
AssertableDiagnostics _diagnose = tester.diagnose();
Iterable<Diagnostic> _allDiagnostics = _diagnose.getAllDiagnostics();
Iterable<AbstractValidationDiagnostic> _filter = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics, AbstractValidationDiagnostic.class);
List<AbstractValidationDiagnostic> diagnotics = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter);
int _size = diagnotics.size();
Assert.assertEquals(1, _size);
final Function1<AbstractValidationDiagnostic, Boolean> _function = new Function1<AbstractValidationDiagnostic, Boolean>() {
public Boolean apply(final AbstractValidationDiagnostic it) {
EObject _sourceEObject = it.getSourceEObject();
return Boolean.valueOf((_sourceEObject instanceof IncludeDeclaration));
}
};
boolean _forall = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function);
Assert.assertTrue(_forall);
final Procedure1<AbstractValidationDiagnostic> _function_1 = new Procedure1<AbstractValidationDiagnostic>() {
public void apply(final AbstractValidationDiagnostic it) {
String _issueCode = it.getIssueCode();
Assert.assertEquals(TargetPlatformValidator.CHECK__CONFLICTUAL_ID__BETWEEN_INCLUDED_LOCATION, _issueCode);
EObject _sourceEObject = it.getSourceEObject();
String _importURI = ((IncludeDeclaration) _sourceEObject).getImportURI();
Assert.assertEquals("b.tpd", _importURI);
EObject _sourceEObject_1 = it.getSourceEObject();
Resource _eResource = ((IncludeDeclaration) _sourceEObject_1).eResource();
URI _uRI = _eResource.getURI();
String _string = _uRI.toString();
Assert.assertEquals("tmp:/a.tpd", _string);
}
};
IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_1);
Resource _eResource_1 = tpb.eResource();
EList<Resource.Diagnostic> _errors_1 = _eResource_1.getErrors();
boolean _isEmpty_1 = _errors_1.isEmpty();
Assert.assertTrue(_isEmpty_1);
TargetPlatformValidator _validator_1 = tester.validator();
_validator_1.checkSameIDForAllLocationWithSameURI(tpb);
AssertableDiagnostics _diagnose_1 = tester.diagnose();
Iterable<Diagnostic> _allDiagnostics_1 = _diagnose_1.getAllDiagnostics();
Iterable<AbstractValidationDiagnostic> _filter_1 = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics_1, AbstractValidationDiagnostic.class);
List<AbstractValidationDiagnostic> _list = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter_1);
diagnotics = _list;
int _size_1 = diagnotics.size();
Assert.assertEquals(1, _size_1);
final Function1<AbstractValidationDiagnostic, Boolean> _function_2 = new Function1<AbstractValidationDiagnostic, Boolean>() {
public Boolean apply(final AbstractValidationDiagnostic it) {
EObject _sourceEObject = it.getSourceEObject();
return Boolean.valueOf((_sourceEObject instanceof Location));
}
};
boolean _forall_1 = IterableExtensions.<AbstractValidationDiagnostic>forall(diagnotics, _function_2);
Assert.assertTrue(_forall_1);
final Procedure1<AbstractValidationDiagnostic> _function_3 = new Procedure1<AbstractValidationDiagnostic>() {
public void apply(final AbstractValidationDiagnostic it) {
String _issueCode = it.getIssueCode();
Assert.assertEquals(TargetPlatformValidator.CHECK__INCLUDED_LOCATION_CONFLICTUAL_ID, _issueCode);
EObject _sourceEObject = it.getSourceEObject();
String _uri = ((Location) _sourceEObject).getUri();
Assert.assertEquals("locationURI1", _uri);
EObject _sourceEObject_1 = it.getSourceEObject();
Resource _eResource = ((Location) _sourceEObject_1).eResource();
URI _uRI = _eResource.getURI();
String _string = _uRI.toString();
Assert.assertEquals("tmp:/b.tpd", _string);
}
};
IterableExtensions.<AbstractValidationDiagnostic>forEach(diagnotics, _function_3);
Resource _eResource_2 = tpc.eResource();
EList<Resource.Diagnostic> _errors_2 = _eResource_2.getErrors();
boolean _isEmpty_2 = _errors_2.isEmpty();
Assert.assertTrue(_isEmpty_2);
TargetPlatformValidator _validator_2 = tester.validator();
_validator_2.checkSameIDForAllLocationWithSameURI(tpc);
AssertableDiagnostics _diagnose_2 = tester.diagnose();
Iterable<Diagnostic> _allDiagnostics_2 = _diagnose_2.getAllDiagnostics();
Iterable<AbstractValidationDiagnostic> _filter_2 = Iterables.<AbstractValidationDiagnostic>filter(_allDiagnostics_2, AbstractValidationDiagnostic.class);
List<AbstractValidationDiagnostic> _list_1 = IterableExtensions.<AbstractValidationDiagnostic>toList(_filter_2);
diagnotics = _list_1;
int _size_2 = diagnotics.size();
Assert.assertEquals(0, _size_2);