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 FieldDeclarationCanBeLocalVariable_Test extends BaseTransformationTest {
  @RegisterExtension
  private static final TestParametersCacheExtension ourParametersCacheExtension = new TestParametersCacheExtension(new TestParametersCache(FieldDeclarationCanBeLocalVariable_Test.class, "${mps_home}", "r:00000000-0000-4000-0000-011c895902c7(jetbrains.mps.baseLanguage.test@tests)", false));

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

  @Test
  public void test_ErrorMessagesCheck4914675704512537909() throws Throwable {
    new TestBody(this).test_ErrorMessagesCheck4914675704512537909();
  }
  @Test
  public void test_NodeFieldCanBeConvertedIntoCheck6923385624929133464() throws Throwable {
    new TestBody(this).test_NodeFieldCanBeConvertedIntoCheck6923385624929133464();
  }
  @Test
  public void test_ErrorMessagesCheck4914675704512538465() throws Throwable {
    new TestBody(this).test_ErrorMessagesCheck4914675704512538465();
  }
  @Test
  public void test_NodeFieldCanBeConvertedIntoCheck6923385624927428315() throws Throwable {
    new TestBody(this).test_NodeFieldCanBeConvertedIntoCheck6923385624927428315();
  }
  @Test
  public void test_ErrorMessagesCheck4914675704512541562() throws Throwable {
    new TestBody(this).test_ErrorMessagesCheck4914675704512541562();
  }
  @Test
  public void test_NodeFieldCanBeConvertedIntoCheck1500881288847768704() throws Throwable {
    new TestBody(this).test_NodeFieldCanBeConvertedIntoCheck1500881288847768704();
  }
  @Test
  public void test_ErrorMessagesCheck4914675704512555962() throws Throwable {
    new TestBody(this).test_ErrorMessagesCheck4914675704512555962();
  }
  @Test
  public void test_NodeFieldCanBeConvertedIntoCheck6923385624929216447() throws Throwable {
    new TestBody(this).test_NodeFieldCanBeConvertedIntoCheck6923385624929216447();
  }
  @Test
  public void test_ErrorMessagesCheck4914675704512587973() throws Throwable {
    new TestBody(this).test_ErrorMessagesCheck4914675704512587973();
  }

  /*package*/ static class TestBody extends BaseTestBody {

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

    public void test_ErrorMessagesCheck4914675704512537909() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4914675704512530934");
        SNode operation = getRealNodeById("4914675704512537909");
        new CheckErrorMessagesRunnable(nodeToCheck, false, false, ((ProjectBase) myProject).getPlatform()).includeSelf(false).exclude(ListSequence.fromList(new ArrayList<CheckExpectedMessageRunnable>())).run();
      });
    }
    public void test_NodeFieldCanBeConvertedIntoCheck6923385624929133464() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("3951985765451231004");
        SNode operation = getRealNodeById("6923385624929133464");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "6640766779592666289"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_ErrorMessagesCheck4914675704512538465() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4914675704512538441");
        SNode operation = getRealNodeById("4914675704512538465");
        new CheckErrorMessagesRunnable(nodeToCheck, false, false, ((ProjectBase) myProject).getPlatform()).includeSelf(false).exclude(ListSequence.fromListAndArray(new ArrayList<CheckExpectedMessageRunnable>(), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451231004"), MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "6640766779592666289"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()))).run();
      });
    }
    public void test_NodeFieldCanBeConvertedIntoCheck6923385624927428315() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("3951985765451230872");
        SNode operation = getRealNodeById("6923385624927428315");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "6640766779592666289"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_ErrorMessagesCheck4914675704512541562() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4914675704512541538");
        SNode operation = getRealNodeById("4914675704512541562");
        new CheckErrorMessagesRunnable(nodeToCheck, false, false, ((ProjectBase) myProject).getPlatform()).includeSelf(false).exclude(ListSequence.fromListAndArray(new ArrayList<CheckExpectedMessageRunnable>(), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451230872"), MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "6640766779592666289"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()))).run();
      });
    }
    public void test_NodeFieldCanBeConvertedIntoCheck1500881288847768704() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4914675704512555939");
        SNode operation = getRealNodeById("1500881288847768704");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "6640766779592666289"), "Warning: Field can be converted into a local variable", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_ErrorMessagesCheck4914675704512555962() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4914675704512555938");
        SNode operation = getRealNodeById("4914675704512555962");
        new CheckErrorMessagesRunnable(nodeToCheck, false, false, ((ProjectBase) myProject).getPlatform()).includeSelf(false).exclude(ListSequence.fromListAndArray(new ArrayList<CheckExpectedMessageRunnable>(), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("4914675704512555939"), MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "6640766779592666289"), "Warning: Field can be converted into a local variable", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()))).run();
      });
    }
    public void test_NodeFieldCanBeConvertedIntoCheck6923385624929216447() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("3951985765451227978");
        SNode operation = getRealNodeById("6923385624929216447");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "6640766779592666289"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_ErrorMessagesCheck4914675704512587973() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4914675704512587942");
        SNode operation = getRealNodeById("4914675704512587973");
        new CheckErrorMessagesRunnable(nodeToCheck, false, false, ((ProjectBase) myProject).getPlatform()).includeSelf(false).exclude(ListSequence.fromListAndArray(new ArrayList<CheckExpectedMessageRunnable>(), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451227978"), MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "6640766779592666289"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()))).run();
      });
    }

  }
}
