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;

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

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

  @Test
  public void test_NodeUnreachableNodeErrorCheck8011059391273137899() throws Throwable {
    new TestBody(this).test_NodeUnreachableNodeErrorCheck8011059391273137899();
  }
  @Test
  public void test_NodeUnreachableNodeErrorCheck8011059391272508723() throws Throwable {
    new TestBody(this).test_NodeUnreachableNodeErrorCheck8011059391272508723();
  }
  @Test
  public void test_NodeTheBinaryLogicalExpressionCheck8011059391272522506() throws Throwable {
    new TestBody(this).test_NodeTheBinaryLogicalExpressionCheck8011059391272522506();
  }
  @Test
  public void test_NodeTheConditionIsAlwaysCheck8011059391272522509() throws Throwable {
    new TestBody(this).test_NodeTheConditionIsAlwaysCheck8011059391272522509();
  }
  @Test
  public void test_NodeUnreachableNodeErrorCheck8011059391272507836() throws Throwable {
    new TestBody(this).test_NodeUnreachableNodeErrorCheck8011059391272507836();
  }
  @Test
  public void test_NodeTheBinaryLogicalExpressionCheck8011059391272527811() throws Throwable {
    new TestBody(this).test_NodeTheBinaryLogicalExpressionCheck8011059391272527811();
  }
  @Test
  public void test_NodeTheConditionIsAlwaysCheck8011059391272527814() throws Throwable {
    new TestBody(this).test_NodeTheConditionIsAlwaysCheck8011059391272527814();
  }
  @Test
  public void test_NodeTheBinaryLogicalExpressionCheck8011059391272543857() throws Throwable {
    new TestBody(this).test_NodeTheBinaryLogicalExpressionCheck8011059391272543857();
  }
  @Test
  public void test_NodeTheBinaryLogicalExpressionCheck8011059391272542861() throws Throwable {
    new TestBody(this).test_NodeTheBinaryLogicalExpressionCheck8011059391272542861();
  }

  /*package*/ static class TestBody extends BaseTestBody {

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

    public void test_NodeUnreachableNodeErrorCheck8011059391273137899() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272507579");
        SNode operation = getRealNodeById("8011059391273137899");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.ERROR, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "1597542831870510169"), "Error: Unreachable node ", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeUnreachableNodeErrorCheck8011059391272508723() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272508718");
        SNode operation = getRealNodeById("8011059391272508723");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.ERROR, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "1597542831870510169"), "Error: Unreachable node ", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeTheBinaryLogicalExpressionCheck8011059391272522506() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272519672");
        SNode operation = getRealNodeById("8011059391272522506");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8626468694779180757"), "Warning: The binary logical expression b1||b2 can be simplified", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeTheConditionIsAlwaysCheck8011059391272522509() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272519672");
        SNode operation = getRealNodeById("8011059391272522509");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8245314650935561947"), "Warning: The condition is always true", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeUnreachableNodeErrorCheck8011059391272507836() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272507831");
        SNode operation = getRealNodeById("8011059391272507836");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.ERROR, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "1597542831870510169"), "Error: Unreachable node ", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeTheBinaryLogicalExpressionCheck8011059391272527811() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272525325");
        SNode operation = getRealNodeById("8011059391272527811");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8626468694779180757"), "Warning: The binary logical expression b1&&b2 can be simplified", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeTheConditionIsAlwaysCheck8011059391272527814() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272525325");
        SNode operation = getRealNodeById("8011059391272527814");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8245314650935561947"), "Warning: The condition is always false", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeTheBinaryLogicalExpressionCheck8011059391272543857() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272532381");
        SNode operation = getRealNodeById("8011059391272543857");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "3832376534028382760"), "Warning: The binary logical expression b2||System.currentTimeMillis():long>1 can be simplified", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeTheBinaryLogicalExpressionCheck8011059391272542861() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272528285");
        SNode operation = getRealNodeById("8011059391272542861");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "3832376534028382760"), "Warning: The binary logical expression b1&&(b2||System.currentTimeMillis():long>1) can be simplified", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }

  }
}
