use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Add in project xtext-core by eclipse.
the class PartialSerializerTest method testOptionalChildListInsertIntoEmpty2.
@Test
public void testOptionalChildListInsertIntoEmpty2() {
final IChangeSerializer.IModification<OptionalChildList> _function = (OptionalChildList it) -> {
EList<MandatoryValue> _children = it.getChildren();
MandatoryValue _createMandatoryValue = this.fac.createMandatoryValue();
final Procedure1<MandatoryValue> _function_1 = (MandatoryValue it_1) -> {
it_1.setName("foo");
};
MandatoryValue _doubleArrow = ObjectExtensions.<MandatoryValue>operator_doubleArrow(_createMandatoryValue, _function_1);
_children.add(_doubleArrow);
EList<MandatoryValue> _children_1 = it.getChildren();
MandatoryValue _createMandatoryValue_1 = this.fac.createMandatoryValue();
final Procedure1<MandatoryValue> _function_2 = (MandatoryValue it_1) -> {
it_1.setName("bar");
};
MandatoryValue _doubleArrow_1 = ObjectExtensions.<MandatoryValue>operator_doubleArrow(_createMandatoryValue_1, _function_2);
_children_1.add(_doubleArrow_1);
};
ITextRegionAccess _recordDiff = this.<OptionalChildList>recordDiff(OptionalChildList.class, "#13", _function);
StringConcatenation _builder = new StringConcatenation();
_builder.append("0 0 H");
_builder.newLine();
_builder.append(" ");
_builder.append("B OptionalChildList Model");
_builder.newLine();
_builder.append("0 3 1 S \"#13\" Model:\'#13\'");
_builder.newLine();
_builder.append("3 0 1 H");
_builder.newLine();
_builder.append(" ");
_builder.append("B MandatoryValue\'foo\' MandatoryValue path:OptionalChildList/children[0]");
_builder.newLine();
_builder.append("3 3 1 S \"foo\" MandatoryValue:name=ID");
_builder.newLine();
_builder.append(" ");
_builder.append("E MandatoryValue\'foo\' MandatoryValue path:OptionalChildList/children[0]");
_builder.newLine();
_builder.append("6 0 1 H");
_builder.newLine();
_builder.append(" ");
_builder.append("B MandatoryValue\'bar\' MandatoryValue path:OptionalChildList/children[1]");
_builder.newLine();
_builder.append("6 3 1 S \"bar\" MandatoryValue:name=ID");
_builder.newLine();
_builder.append(" ");
_builder.append("E MandatoryValue\'bar\' MandatoryValue path:OptionalChildList/children[1]");
_builder.newLine();
_builder.append(" ");
_builder.append("E OptionalChildList Model");
_builder.newLine();
_builder.append("9 0 1 H");
_builder.newLine();
_builder.append("------------ diff 1 ------------");
_builder.newLine();
_builder.append("0 3 S \"#13\" Model:\'#13\'");
_builder.newLine();
_builder.append("3 0 H");
_builder.newLine();
this._changeSerializerTestHelper.operator_tripleEquals(_recordDiff, _builder);
}
Aggregations