package jetbrains.mps.lang.editor.folding.test; /*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.Set; import jetbrains.mps.nodeEditor.EditorCell_WithComponent; import junit.framework.Assert; import jetbrains.mps.internal.collections.runtime.SetSequence; @MPSLaunch public class CollapseInnerSwingComponent_Test extends BaseTransformationTest { @Test public void test_CollapseInnerSwingComponent() throws Throwable { initTest("${mps_home}", "r:0204c664-b836-4137-bb87-42caecd8a4e3(jetbrains.mps.lang.editor.folding.test)"); runTest("jetbrains.mps.lang.editor.folding.test.CollapseInnerSwingComponent_Test$TestBody", "testMethod", false); } @MPSLaunch public static class TestBody extends BaseEditorTestBody { @Override public void testMethodImpl() throws Exception { initEditorComponent("3824034168925667354", "3824034168925669872"); invokeAction("jetbrains.mps.ide.editor.actions.Collapse_Action"); invokeAction("jetbrains.mps.ide.editor.actions.Collapse_Action"); Set<EditorCell_WithComponent> componentCells = getEditorComponent().getCellTracker().getComponentCells(); Assert.assertFalse(componentCells.isEmpty()); for (EditorCell_WithComponent cell : SetSequence.fromSet(componentCells)) { Assert.assertFalse(cell.getComponent().isVisible()); } } } }