package jetbrains.mps.lang.editor.menus.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.util.List; import jetbrains.mps.openapi.editor.menus.transformation.TransformationMenuItem; import jetbrains.mps.smodel.SNodePointer; import junit.framework.Assert; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.openapi.editor.menus.transformation.ActionItem; @MPSLaunch public class IncludingSubstituteMenuForEmptyCell_Test extends BaseTransformationTest { @Test public void test_IncludingSubstituteMenuForEmptyCell() throws Throwable { initTest("${mps_home}", "r:4f8193a2-048e-4ddf-b505-dfca00e8c910(jetbrains.mps.lang.editor.menus.tests@tests)"); runTest("jetbrains.mps.lang.editor.menus.tests.IncludingSubstituteMenuForEmptyCell_Test$TestBody", "testMethod", false); } @MPSLaunch public static class TestBody extends BaseEditorTestBody { @Override public void testMethodImpl() throws Exception { initEditorComponent("8991930073416032210", ""); List<TransformationMenuItem> items = MenuLoadingUtils.loadNamedMenu(getEditorComponent(), new SNodePointer("r:3b1c2f8c-f04f-4186-97fc-85ed47ba8aeb(jetbrains.mps.lang.editor.menus.testLanguage.editor)", "8991930073415901008"), "test location"); Assert.assertEquals(1, ListSequence.fromList(items).count()); ActionItem item = (ActionItem) ListSequence.fromList(items).getElement(0); Assert.assertEquals("substitute child", item.getLabelText("")); } } }