package jetbrains.mps.testActions.test;
/*Generated by MPS */
import jetbrains.mps.MPSLaunch;
import jetbrains.mps.lang.test.runtime.BaseTransformationTest;
import org.junit.Test;
import jetbrains.mps.lang.test.runtime.BaseTestBody;
import java.util.Set;
import jetbrains.mps.testActions.util.FlyingActionsFinder;
import junit.framework.Assert;
@MPSLaunch
public class ActionsTest_Test extends BaseTransformationTest {
@Test
public void test_checkRoots() throws Throwable {
initTest("${mps_home}", "r:43a3062d-cf3d-40ad-9c9d-c7da54cc927b(jetbrains.mps.testActions.test@tests)", true);
runTest("jetbrains.mps.testActions.test.ActionsTest_Test$TestBody", "test_checkRoots", true);
}
@MPSLaunch
public static class TestBody extends BaseTestBody {
public void test_checkRoots() throws Exception {
final String lineSeparator = System.getProperty("line.separator");
Set<String> flyingActions = FlyingActionsFinder.getAllFlyingActions();
StringBuilder error = new StringBuilder("List of actions without parent or shortcut:");
error.append(lineSeparator);
for (String s : flyingActions) {
error.append(s);
error.append(lineSeparator);
}
error.append("To avoid error You can add shortcut, join action to some group or add to exception list of flying actions:");
error.append(lineSeparator);
for (String s : FlyingActionsFinder.getMPSRootActionIds()) {
error.append(s);
error.append(lineSeparator);
}
Assert.assertTrue(error.toString(), flyingActions.isEmpty());
}
}
}