package jetbrains.mps.baseLanguage.test;

/*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 org.junit.jupiter.api.Test;
import jetbrains.mps.lang.test.runtime.BaseTestBody;
import jetbrains.mps.lang.test.runtime.TransformationTest;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.test.runtime.CheckErrorMessagesRunnable;
import jetbrains.mps.project.ProjectBase;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import java.util.ArrayList;
import jetbrains.mps.lang.test.runtime.CheckExpectedMessageRunnable;
import jetbrains.mps.errors.MessageStatus;
import jetbrains.mps.smodel.SNodePointer;

@MPSLaunch
public class UnusedVariableDeclaration_Test extends BaseTransformationTest {
  @RegisterExtension
  private static final TestParametersCacheExtension ourParametersCacheExtension = new TestParametersCacheExtension(new TestParametersCache(UnusedVariableDeclaration_Test.class, "${mps_home}", "r:00000000-0000-4000-0000-011c895902c7(jetbrains.mps.baseLanguage.test@tests)", false));

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

  @Test
  public void test_UnusedVariableDeclaration() throws Throwable {
    new TestBody(this).test_UnusedVariableDeclaration();
  }
  @Test
  public void test_ErrorMessagesCheck5684597377559856228() throws Throwable {
    new TestBody(this).test_ErrorMessagesCheck5684597377559856228();
  }
  @Test
  public void test_NodeUnusedVariableWarningCheck4056233746953728156() throws Throwable {
    new TestBody(this).test_NodeUnusedVariableWarningCheck4056233746953728156();
  }
  @Test
  public void test_NodeUnusedVariableWarningCheck4056233746953729046() throws Throwable {
    new TestBody(this).test_NodeUnusedVariableWarningCheck4056233746953729046();
  }
  @Test
  public void test_NodeUnusedVariableWarningCheck6923385624929638863() throws Throwable {
    new TestBody(this).test_NodeUnusedVariableWarningCheck6923385624929638863();
  }

  /*package*/ static class TestBody extends BaseTestBody {

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

    public void test_UnusedVariableDeclaration() throws Exception {
      runWithinCommand(() -> addNodeById("1217271587025"));
    }
    public void test_ErrorMessagesCheck5684597377559856228() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("1216889573145");
        SNode operation = getRealNodeById("5684597377559856228");
        new CheckErrorMessagesRunnable(nodeToCheck, false, false, ((ProjectBase) myProject).getPlatform()).includeSelf(false).exclude(ListSequence.fromListAndArray(new ArrayList<CheckExpectedMessageRunnable>(), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451228026"), MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "4056233746948448436"), "Warning: Unused variable", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451231209"), MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8937659523942275424"), "Warning: Unused variable", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451221253"), MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8937659523942275424"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()))).run();
      });
    }
    public void test_NodeUnusedVariableWarningCheck4056233746953728156() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("3951985765451228026");
        SNode operation = getRealNodeById("4056233746953728156");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "4056233746948448436"), "Warning: Unused variable", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeUnusedVariableWarningCheck4056233746953729046() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("3951985765451231209");
        SNode operation = getRealNodeById("4056233746953729046");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8937659523942275424"), "Warning: Unused variable", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeUnusedVariableWarningCheck6923385624929638863() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("3951985765451221253");
        SNode operation = getRealNodeById("6923385624929638863");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8937659523942275424"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }

  }
}
