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

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

  @Test
  public void test_ErrorMessagesCheck4705425356438246964() throws Throwable {
    new TestBody(this).test_ErrorMessagesCheck4705425356438246964();
  }
  @Test
  public void test_NodeVariableHasNotBeenInitializedCheck6923385624929711095() throws Throwable {
    new TestBody(this).test_NodeVariableHasNotBeenInitializedCheck6923385624929711095();
  }
  @Test
  public void test_NodeErrorCheck8129007564265886454() throws Throwable {
    new TestBody(this).test_NodeErrorCheck8129007564265886454();
  }
  @Test
  public void test_NodeCannotAssignValueToFinalCheck6923385624928162026() throws Throwable {
    new TestBody(this).test_NodeCannotAssignValueToFinalCheck6923385624928162026();
  }
  @Test
  public void test_NodeCannotAssignValueToFinalCheck6923385624929647060() throws Throwable {
    new TestBody(this).test_NodeCannotAssignValueToFinalCheck6923385624929647060();
  }
  @Test
  public void test_NodeCannotAssignValueToFinalCheck6923385624929358438() throws Throwable {
    new TestBody(this).test_NodeCannotAssignValueToFinalCheck6923385624929358438();
  }
  @Test
  public void test_NodeVariableInitializerIsRedundantWarningCheck6923385624927750488() throws Throwable {
    new TestBody(this).test_NodeVariableInitializerIsRedundantWarningCheck6923385624927750488();
  }
  @Test
  public void test_NodeCannotAssignValueToFinalCheck6923385624927704204() throws Throwable {
    new TestBody(this).test_NodeCannotAssignValueToFinalCheck6923385624927704204();
  }

  /*package*/ static class TestBody extends BaseTestBody {

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

    public void test_ErrorMessagesCheck4705425356438246964() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("4705425356438246926");
        SNode operation = getRealNodeById("4705425356438246964");
        new CheckErrorMessagesRunnable(nodeToCheck, false, false, ((ProjectBase) myProject).getPlatform()).includeSelf(false).exclude(ListSequence.fromListAndArray(new ArrayList<CheckExpectedMessageRunnable>(), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451228255"), MessageStatus.ERROR, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "843236768047887576"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()), new CheckExpectedMessageRunnable.CheckAnyMessageRunnable(getRealNodeById("6640766779612767800"), MessageStatus.ERROR, "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451228600"), MessageStatus.ERROR, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "4705425356438183038"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451226154"), MessageStatus.ERROR, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "4705425356438183038"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451229008"), MessageStatus.ERROR, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "4705425356437995968"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451229128"), MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "963887337804010668"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()), new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(getRealNodeById("3951985765451230643"), MessageStatus.ERROR, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "4705425356437995912"), "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()))).run();
      });
    }
    public void test_NodeVariableHasNotBeenInitializedCheck6923385624929711095() throws Exception {

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

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("6640766779612767800");
        SNode operation = getRealNodeById("8129007564265886454");
        new CheckExpectedMessageRunnable.CheckAnyMessageRunnable(nodeToCheck, MessageStatus.ERROR, "", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeCannotAssignValueToFinalCheck6923385624928162026() throws Exception {

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

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

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

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

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

  }
}
