use of org.eclipse.xtext.resource.persistence.SerializableEObjectDescription in project xtext-core by eclipse.
the class SerializableResourceDescriptionTest method assertDescriptionsEqual.
public void assertDescriptionsEqual(final SerializableResourceDescription before, final SerializableResourceDescription after) {
Assert.assertEquals(before.getURI(), after.getURI());
Assert.assertEquals(before.getImportedNames(), after.getImportedNames());
Assert.assertEquals(before.getReferences().size(), after.getReferences().size());
int _size = before.getReferences().size();
ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _size, true);
for (final int i : _doubleDotLessThan) {
{
final SerializableReferenceDescription beforeRef = before.getReferences().get(i);
final SerializableReferenceDescription afterRef = after.getReferences().get(i);
Assert.assertEquals(beforeRef.getContainerEObjectURI(), afterRef.getContainerEObjectURI());
Assert.assertEquals(beforeRef.getSourceEObjectUri(), afterRef.getSourceEObjectUri());
Assert.assertEquals(beforeRef.getTargetEObjectUri(), afterRef.getTargetEObjectUri());
Assert.assertEquals(beforeRef.getEReference(), afterRef.getEReference());
Assert.assertEquals(beforeRef.getIndexInList(), afterRef.getIndexInList());
}
}
Assert.assertEquals(before.getDescriptions().size(), after.getDescriptions().size());
int _size_1 = before.getDescriptions().size();
ExclusiveRange _doubleDotLessThan_1 = new ExclusiveRange(0, _size_1, true);
for (final int i_1 : _doubleDotLessThan_1) {
{
final SerializableEObjectDescription beforeDesc = before.getDescriptions().get(i_1);
final SerializableEObjectDescription afterDesc = after.getDescriptions().get(i_1);
Assert.assertEquals(beforeDesc.getEClass(), afterDesc.getEClass());
Assert.assertEquals(beforeDesc.getName(), afterDesc.getName());
Assert.assertEquals(beforeDesc.qualifiedName, afterDesc.qualifiedName);
Assert.assertEquals(beforeDesc.userData, afterDesc.userData);
Assert.assertEquals(beforeDesc.getEObjectURI(), afterDesc.getEObjectURI());
}
}
}
Aggregations