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 junit.framework.Assert; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.internal.collections.runtime.IWhereFilter; import jetbrains.mps.openapi.editor.menus.transformation.ActionItem; @MPSLaunch public class ActionLookup_SubconceptDefinesAMenuWithoutSuperconceptsLocation_Test extends BaseTransformationTest { @Test public void test_ActionLookup_SubconceptDefinesAMenuWithoutSuperconceptsLocation() 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.ActionLookup_SubconceptDefinesAMenuWithoutSuperconceptsLocation_Test$TestBody", "testMethod", false); } @MPSLaunch public static class TestBody extends BaseEditorTestBody { @Override public void testMethodImpl() throws Exception { initEditorComponent("7552401496952062169", ""); List<TransformationMenuItem> items = MenuLoadingUtils.loadDefaultMenu(getEditorComponent(), "test location"); Assert.assertTrue("Expected 'action from base menu' in " + items, ListSequence.fromList(items).any(new IWhereFilter<TransformationMenuItem>() { public boolean accept(TransformationMenuItem it) { return it instanceof ActionItem && "action from base menu".equals(((ActionItem) it).getLabelText("")); } })); } } }