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 jetbrains.mps.baseLanguage.closures.runtime.Wrappers; import jetbrains.jetpad.mapper.Mapper; import jetbrains.mps.smodel.ModelAccess; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import junit.framework.Assert; import jetbrains.mps.lang.editor.diagram.runtime.jetpad.views.PortDecoratorView; @MPSLaunch public class PortHasNoDecoratorTest_Test extends BaseTransformationTest { @Test public void test_PortHasNoDecoratorTest() 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.PortHasNoDecoratorTest_Test$TestBody", "testMethod", false); } @MPSLaunch public static class TestBody extends BaseEditorTestBody { @Override public void testMethodImpl() throws Exception { initEditorComponent("1560508619094462935", "1560508619094462940"); final Wrappers._T<Mapper> descendantMapper = new Wrappers._T<Mapper>(); ModelAccess.instance().runReadAction(new Runnable() { public void run() { descendantMapper.value = DecoratorTestRunner.getMapper(SNodeOperations.cast(getNodeById("1560508619094462938"), SNodeOperations.asSConcept(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x50560c9658e49c5L, 0xb8e79e4db4c7e97fL, "jetbrains.mps.lang.editor.diagram.testLanguage"), 0x4ce40ecaf41f71f2L, "InputPort"))), getEditorComponent()); } }); Assert.assertTrue(descendantMapper.value != null); Assert.assertTrue(descendantMapper.value.getTarget() != null); Assert.assertTrue(descendantMapper.value.getTarget() instanceof PortDecoratorView); Assert.assertFalse(((PortDecoratorView) descendantMapper.value.getTarget()).hasError.get()); } } }