package jetbrains.mps.lang.editor.diagram.tests; /*Generated by MPS */ import jetbrains.mps.MPSLaunch; import jetbrains.mps.lang.test.runtime.BaseTransformationTest; import org.junit.Test; import jetbrains.mps.lang.test.runtime.BaseEditorTestBody; import java.awt.Component; import java.awt.event.MouseEvent; @MPSLaunch public class CreateLink_Test extends BaseTransformationTest { @Test public void test_CreateLink() throws Throwable { initTest("${mps_home}", "r:e41d7e03-7ef3-4161-a48a-e48d8152e422(jetbrains.mps.lang.editor.diagram.tests@tests)"); runTest("jetbrains.mps.lang.editor.diagram.tests.CreateLink_Test$TestBody", "testMethod", false); } @MPSLaunch public static class TestBody extends BaseEditorTestBody { @Override public void testMethodImpl() throws Exception { initEditorComponent("5540569706414443798", "5540569706415669333"); { int x_rsydnf_a0 = 105; int y_rsydnf_a0 = 60; Component eventTargetComponent_rsydnf_a0 = processMouseEvent(x_rsydnf_a0, y_rsydnf_a0, MouseEvent.MOUSE_PRESSED); // This is a work-around for existing problem with connection creation: // for now connection source will be selected on receiving first mouse drag event // in general connection source should be selected on mouse-pressed event // TODO: remove first drag mouse statement. processSecondaryMouseEvent(eventTargetComponent_rsydnf_a0, x_rsydnf_a0 = 106, y_rsydnf_a0 = 60, MouseEvent.MOUSE_DRAGGED); processSecondaryMouseEvent(eventTargetComponent_rsydnf_a0, x_rsydnf_a0 = 195, y_rsydnf_a0 = 240, MouseEvent.MOUSE_DRAGGED); processSecondaryMouseEvent(eventTargetComponent_rsydnf_a0, x_rsydnf_a0, y_rsydnf_a0, MouseEvent.MOUSE_RELEASED); } } } }