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

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

  @Test
  public void test_NodeUnreachableCodeCheck8011059391324003520() throws Throwable {
    new TestBody(this).test_NodeUnreachableCodeCheck8011059391324003520();
  }
  @Test
  public void test_NodeTheBinaryLogicalExpressionCheck8011059391272914222() throws Throwable {
    new TestBody(this).test_NodeTheBinaryLogicalExpressionCheck8011059391272914222();
  }
  @Test
  public void test_NodeTheConditionIsAlwaysCheck8011059391272914225() throws Throwable {
    new TestBody(this).test_NodeTheConditionIsAlwaysCheck8011059391272914225();
  }
  @Test
  public void test_NodeUnreachableCodeCheck8011059391325000458() throws Throwable {
    new TestBody(this).test_NodeUnreachableCodeCheck8011059391325000458();
  }
  @Test
  public void test_NodeTheBinaryLogicalExpressionCheck8011059391272887198() throws Throwable {
    new TestBody(this).test_NodeTheBinaryLogicalExpressionCheck8011059391272887198();
  }
  @Test
  public void test_NodeTheConditionIsAlwaysCheck8011059391272887201() throws Throwable {
    new TestBody(this).test_NodeTheConditionIsAlwaysCheck8011059391272887201();
  }
  @Test
  public void test_NodeTheBinaryLogicalExpressionCheck8011059391272887239() throws Throwable {
    new TestBody(this).test_NodeTheBinaryLogicalExpressionCheck8011059391272887239();
  }
  @Test
  public void test_NodeTheBinaryLogicalExpressionCheck8011059391272887243() throws Throwable {
    new TestBody(this).test_NodeTheBinaryLogicalExpressionCheck8011059391272887243();
  }

  /*package*/ static class TestBody extends BaseTestBody {

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

    public void test_NodeUnreachableCodeCheck8011059391324003520() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391323082664");
        SNode operation = getRealNodeById("8011059391324003520");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8011059391323084643"), "Warning: Unreachable code", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeTheBinaryLogicalExpressionCheck8011059391272914222() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272910989");
        SNode operation = getRealNodeById("8011059391272914222");
        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_NodeTheConditionIsAlwaysCheck8011059391272914225() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272910989");
        SNode operation = getRealNodeById("8011059391272914225");
        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_NodeUnreachableCodeCheck8011059391325000458() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391324996883");
        SNode operation = getRealNodeById("8011059391325000458");
        new CheckExpectedMessageRunnable.CheckExpectedRuleMessageRunnable(nodeToCheck, MessageStatus.WARNING, new SNodePointer("r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)", "8011059391323084643"), "Warning: Unreachable code", myProject.getRepository(), ((ProjectBase) myProject).getPlatform()).run();
      });
    }
    public void test_NodeTheBinaryLogicalExpressionCheck8011059391272887198() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272887194");
        SNode operation = getRealNodeById("8011059391272887198");
        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_NodeTheConditionIsAlwaysCheck8011059391272887201() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272887194");
        SNode operation = getRealNodeById("8011059391272887201");
        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_NodeTheBinaryLogicalExpressionCheck8011059391272887239() throws Exception {

      runWithinCommand(() -> {
        SNode nodeToCheck = getRealNodeById("8011059391272887233");
        SNode operation = getRealNodeById("8011059391272887239");
        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_NodeTheBinaryLogicalExpressionCheck8011059391272887243() throws Exception {

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

  }
}
