use of org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.OptionalValue in project xtext-core by eclipse.
the class PartialSerializerTest method testOptionalValueInsert.
@Test
public void testOptionalValueInsert() {
final IChangeSerializer.IModification<OptionalValue> _function = (OptionalValue it) -> {
it.setName("foo");
};
ITextRegionAccess _recordDiff = this.<OptionalValue>recordDiff(OptionalValue.class, "#3", _function);
StringConcatenation _builder = new StringConcatenation();
_builder.append("0 0 1 H");
_builder.newLine();
_builder.append(" ");
_builder.append("B OptionalValue\'foo\' Model");
_builder.newLine();
_builder.append("0 2 1 S \"#3\" Model:\'#3\'");
_builder.newLine();
_builder.append("2 0 1 H");
_builder.newLine();
_builder.append("2 3 1 S \"foo\" OptionalValue:name=ID");
_builder.newLine();
_builder.append(" ");
_builder.append("E OptionalValue\'foo\' Model");
_builder.newLine();
_builder.append("5 0 1 H");
_builder.newLine();
_builder.append("------------ diff 1 ------------");
_builder.newLine();
_builder.append("0 0 H");
_builder.newLine();
_builder.append("0 2 S \"#3\" Model:\'#3\'");
_builder.newLine();
_builder.append("2 0 H");
_builder.newLine();
this._changeSerializerTestHelper.operator_tripleEquals(_recordDiff, _builder);
}
use of org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.OptionalValue in project xtext-core by eclipse.
the class PartialSerializerTest method testOptionalValueRemove.
@Test
public void testOptionalValueRemove() {
final IChangeSerializer.IModification<OptionalValue> _function = (OptionalValue it) -> {
it.setName(null);
};
ITextRegionAccess _recordDiff = this.<OptionalValue>recordDiff(OptionalValue.class, "#3 foo", _function);
StringConcatenation _builder = new StringConcatenation();
_builder.append("0 0 H");
_builder.newLine();
_builder.append(" ");
_builder.append("B OptionalValue Model");
_builder.newLine();
_builder.append("0 2 S \"#3\" Model:\'#3\'");
_builder.newLine();
_builder.append(" ");
_builder.append("E OptionalValue Model");
_builder.newLine();
_builder.append("2 1 1 H \" \" Whitespace:TerminalRule\'WS\'");
_builder.newLine();
_builder.append("------------ diff 1 ------------");
_builder.newLine();
_builder.append("2 1 H \" \" Whitespace:TerminalRule\'WS\'");
_builder.newLine();
_builder.append("3 3 S \"foo\" OptionalValue:name=ID");
_builder.newLine();
_builder.append("6 0 H");
_builder.newLine();
this._changeSerializerTestHelper.operator_tripleEquals(_recordDiff, _builder);
}
use of org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.OptionalValue in project xtext-core by eclipse.
the class PartialSerializerTest method testOptionalValueChange.
@Test
public void testOptionalValueChange() {
final IChangeSerializer.IModification<OptionalValue> _function = (OptionalValue it) -> {
it.setName("baz");
};
ITextRegionAccess _recordDiff = this.<OptionalValue>recordDiff(OptionalValue.class, "#3 foo", _function);
StringConcatenation _builder = new StringConcatenation();
_builder.append("0 0 H");
_builder.newLine();
_builder.append(" ");
_builder.append("B OptionalValue\'baz\' Model");
_builder.newLine();
_builder.append("0 2 S \"#3\" Model:\'#3\'");
_builder.newLine();
_builder.append("2 1 H \" \" Whitespace:TerminalRule\'WS\'");
_builder.newLine();
_builder.append("3 3 1 S \"baz\" OptionalValue:name=ID");
_builder.newLine();
_builder.append(" ");
_builder.append("E OptionalValue\'baz\' Model");
_builder.newLine();
_builder.append("6 0 H");
_builder.newLine();
_builder.append("------------ diff 1 ------------");
_builder.newLine();
_builder.append("3 3 S \"foo\" OptionalValue:name=ID");
_builder.newLine();
this._changeSerializerTestHelper.operator_tripleEquals(_recordDiff, _builder);
}
Aggregations