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.CheckExpectedMessageRunnable;
import jetbrains.mps.errors.MessageStatus;
import jetbrains.mps.smodel.SNodePointer;
import jetbrains.mps.project.ProjectBase;
import jetbrains.mps.lang.test.runtime.CheckErrorMessagesRunnable;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import java.util.ArrayList;

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

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

  @Test
  public void test_NodeFieldCanBeConvertedIntoCheck6923385624929411102() throws Throwable {
    new TestBody(this).test_NodeFieldCanBeConvertedIntoCheck6923385624929411102();
  }
  @Test
  public void test_NodeFieldCanBeConvertedIntoCheck6923385624927778166() throws Throwable {
    new TestBody(this).test_NodeFieldCanBeConvertedIntoCheck6923385624927778166();
  }
  @Test
  public void test_NodeFieldIsAssignedButNeverCheck6923385624927778168() throws Throwable {
    new TestBody(this).test_NodeFieldIsAssignedButNeverCheck6923385624927778168();
  }
  @Test
  public void test_ErrorMessagesCheck6640766779615226140() throws Throwable {
    new TestBody(this).test_ErrorMessagesCheck6640766779615226140();
  }
  @Test
  public void test_ErrorMessagesCheck4400998065754588523() throws Throwable {
    new TestBody(this).test_ErrorMessagesCheck4400998065754588523();
  }
  @Test
  public void test_NodeFieldCanBeConvertedIntoCheck4400998065754643596() throws Throwable {
    new TestBody(this).test_NodeFieldCanBeConvertedIntoCheck4400998065754643596();
  }
  @Test
  public void test_NodeFieldCanBeConvertedIntoCheck4400998065754644137() throws Throwable {
    new TestBody(this).test_NodeFieldCanBeConvertedIntoCheck4400998065754644137();
  }
  @Test
  public void test_NodeFieldCanBeConvertedIntoCheck4400998065754644682() throws Throwable {
    new TestBody(this).test_NodeFieldCanBeConvertedIntoCheck4400998065754644682();
  }

  /*package*/ static class TestBody extends BaseTestBody {

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

    public void test_NodeFieldCanBeConvertedIntoCheck6923385624929411102() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("3951985765451229518");
        SNode operation = getRealNodeById("6923385624929411102");
        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_NodeFieldCanBeConvertedIntoCheck6923385624927778166() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("3951985765451230524");
        SNode operation = getRealNodeById("6923385624927778166");
        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_NodeFieldIsAssignedButNeverCheck6923385624927778168() throws Exception {

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

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

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

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4400998065754615248");
        SNode operation = getRealNodeById("4400998065754643596");
        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_NodeFieldCanBeConvertedIntoCheck4400998065754644137() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4400998065754615554");
        SNode operation = getRealNodeById("4400998065754644137");
        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_NodeFieldCanBeConvertedIntoCheck4400998065754644682() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4400998065754615268");
        SNode operation = getRealNodeById("4400998065754644682");
        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();
      });
    }

  }
}
