package jetbrains.mps.refactoringTest; /*Generated by MPS */ import jetbrains.mps.MPSLaunch; import jetbrains.mps.lang.test.runtime.BaseTransformationTest; import org.junit.Test; import jetbrains.mps.lang.test.runtime.BaseTestBody; import jetbrains.mps.baseLanguage.util.plugin.refactorings.InlineMethodRefactoring; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import junit.framework.Assert; @MPSLaunch public class CheckVisibility_Test extends BaseTransformationTest { @Test public void test_CheckVisibility() throws Throwable { initTest("${mps_home}", "r:4dc6ffb5-4bbb-4773-b0b7-e52989ceb56f(jetbrains.mps.refactoringTest@tests)", false); runTest("jetbrains.mps.refactoringTest.CheckVisibility_Test$TestBody", "test_CheckVisibility", true); } @MPSLaunch public static class TestBody extends BaseTestBody { public void test_CheckVisibility() throws Exception { addNodeById("1230053114874"); addNodeById("1230053114900"); InlineMethodRefactoring ref = new InlineMethodRefactoring(SNodeOperations.cast(getNodeById("1230053114888"), SNodeOperations.asSConcept(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x118154a6332L, "InstanceMethodCallOperation")))); Assert.assertTrue(ref.getProblems().length() > 0); ref = new InlineMethodRefactoring(SNodeOperations.cast(getNodeById("1230053114893"), SNodeOperations.asSConcept(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x118154a6332L, "InstanceMethodCallOperation")))); Assert.assertTrue(ref.getProblems().length() > 0); ref = new InlineMethodRefactoring(SNodeOperations.cast(getNodeById("1230053114898"), SNodeOperations.asSConcept(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x118154a6332L, "InstanceMethodCallOperation")))); Assert.assertTrue(ref.getProblems().length() == 0); } } }