assertNotShortcut(text1);
assertNotGenerated(text1);
ShapeNodeEditPart text2 = assertHasInputTextField(editor_page, "text field 2");
assertNotShortcut(text2);
assertNotGenerated(text2);
ConnectionNodeEditPart sync = assertHasSyncWire(editor_page, text1, text2, "sync");
assertNotGenerated(sync);
// open the text field
editor_text = openDiagram(text1);
assertEditorVisual(editor_text);
// should contain a field value
ShapeNodeEditPart text1_value = assertHasFieldValue(editor_text, false);
assertNotShortcut(text1_value);
assertGenerated(text1_value);
// the other fieldValue _should_ most definitely be displayed here, because
// it's used as the parameter for an incoming operation
ShapeNodeEditPart text2_value = assertHasFieldValue(editor_text, true);
assertShortcut(text2_value);
assertGenerated(text2_value);
// editor should contain both "edit" and "update" operations for
// text1 and text2
ShapeNodeEditPart text1_edit = assertHasEvent(editor_text, false, ModelPackage.eINSTANCE.getChangeable_OnChange() );
ShapeNodeEditPart text2_edit = assertHasEvent(editor_text, true, ModelPackage.eINSTANCE.getChangeable_OnChange());
assertNotSame(text1_edit, text2_edit);
assertGenerated(text1_edit);
assertGenerated(text2_edit);
ShapeNodeEditPart text1_update = assertHasOperation(editor_text, "update", false);
ShapeNodeEditPart text2_update = assertHasOperation(editor_text, "update", true);
assertNotSame(text1_update, text2_update);
assertGenerated(text1_update);
assertGenerated(text2_update);
// these should be connected
ConnectionNodeEditPart text1_run = assertHasECARule(editor_text, text1_edit, text2_update, "run");
assertGenerated(text1_run);
ConnectionNodeEditPart text1_param = assertHasParameter(editor_text, text1_value, text1_run);
assertGenerated(text1_param);
ConnectionNodeEditPart text2_run = assertHasECARule(editor_text, text2_edit, text1_update, "run");
assertGenerated(text2_run);
ConnectionNodeEditPart text2_param = assertHasParameter(editor_text, text2_value, text2_run);
assertGenerated(text2_param);
}