use of org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.MandatoryChild in project xtext-core by eclipse.
the class PartialSerializerTest method testMandatoryChildChange.
@Test
public void testMandatoryChildChange() {
ITextRegionAccess diff = recordDiff(MandatoryChild.class, "#4 foo", (MandatoryChild it) -> {
MandatoryValue newMandatoryValue = fac.createMandatoryValue();
newMandatoryValue.setName("baz");
it.setChild(newMandatoryValue);
});
String expectation = "0 0 H\n" + " B MandatoryChild Model\n" + "0 2 S \"#4\" Model:'#4'\n" + "2 1 1 H \" \" Whitespace:TerminalRule'WS'\n" + " B MandatoryValue'baz' MandatoryValue path:MandatoryChild/child\n" + "3 3 1 S \"baz\" MandatoryValue:name=ID\n" + " E MandatoryValue'baz' MandatoryValue path:MandatoryChild/child\n" + " E MandatoryChild Model\n" + "6 0 1 H\n" + "------------ diff 1 ------------\n" + "2 1 H \" \" Whitespace:TerminalRule'WS'\n" + "3 3 S \"foo\" MandatoryValue:name=ID\n" + "6 0 H\n";
changeSerializerTestHelper.operator_tripleEquals(diff, expectation);
}
Aggregations