package jetbrains.mps.migrationTest;

/*Generated by MPS */

import jetbrains.mps.MPSLaunch;
import jetbrains.mps.lang.test.runtime.BaseTransformationTest;
import org.junit.jupiter.api.extension.RegisterExtension;
import jetbrains.mps.lang.test.runtime.TestParametersCacheExtension;
import jetbrains.mps.lang.test.runtime.TestParametersCache;
import jetbrains.mps.lang.test.runtime.ExecuteCommandExtension;
import org.junit.jupiter.api.Test;
import jetbrains.mps.lang.test.runtime.BaseMigrationTestBody;
import jetbrains.mps.lang.test.runtime.TransformationTest;
import java.util.Collection;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import java.util.ArrayList;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.lang.migration.runtime.base.MigrationScript;
import jetbrains.mps.baseLanguage.migration.MigrateTryStatement;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SContainmentLink;

@MPSLaunch
public class MigrateTryStatement_Test extends BaseTransformationTest {
  @RegisterExtension
  private static final TestParametersCacheExtension ourParametersCacheExtension = new TestParametersCacheExtension(new TestParametersCache(MigrateTryStatement_Test.class, "${mps_home}", "r:71718df8-4cce-453f-a660-5133048de06c(jetbrains.mps.migrationTest@tests)", false));

  @RegisterExtension
  private ExecuteCommandExtension myCommandExtension = new ExecuteCommandExtension(this);

  public MigrateTryStatement_Test() {
    super(ourParametersCacheExtension.getParametersCache());
  }

  @Test
  public void test_MigrateTryStatement_Test() throws Throwable {
    new TestBody(this).testMethod();
  }

  /*package*/ static class TestBody extends BaseMigrationTestBody {

    /*package*/ TestBody(TransformationTest owner) {
      super(owner);
    }

    @Override
    public Collection<SNode> getInputNodes() {
      return ListSequence.fromListAndArray(new ArrayList<SNode>(), SLinkOperations.getTarget(SNodeOperations.cast(getRealNodeById("7948043932933885484"), CONCEPTS.TestNode$zF), LINKS.nodeToCheck$OBcW));
    }
    @Override
    public Collection<SNode> getOutputNodes() {
      return ListSequence.fromListAndArray(new ArrayList<SNode>(), SLinkOperations.getTarget(SNodeOperations.cast(getRealNodeById("7948043932933885784"), CONCEPTS.TestNode$zF), LINKS.nodeToCheck$OBcW));
    }
    @Override
    public MigrationScript[] getMigrationScript() {
      return new MigrationScript[]{new MigrateTryStatement()};
    }
    @Override
    public boolean shouldCheckStableIds() {
      return true;
    }
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept TestNode$zF = MetaAdapterFactory.getConcept(0x8585453e6bfb4d80L, 0x98deb16074f1d86cL, 0x11b5a38fc01L, "jetbrains.mps.lang.test.structure.TestNode");
  }

  private static final class LINKS {
    /*package*/ static final SContainmentLink nodeToCheck$OBcW = MetaAdapterFactory.getContainmentLink(0x8585453e6bfb4d80L, 0x98deb16074f1d86cL, 0x11b5a38fc01L, 0x11b5a397b92L, "nodeToCheck");
  }
}
