package jetbrains.mps.lang.editor.menus.substitute.tests.tests;
/*Generated by MPS */
import jetbrains.mps.MPSLaunch;
import jetbrains.mps.lang.test.runtime.BaseTransformationTest;
import org.junit.Test;
import jetbrains.mps.lang.test.runtime.BaseEditorTestBody;
import java.util.List;
import jetbrains.mps.openapi.editor.cells.SubstituteAction;
import junit.framework.Assert;
@MPSLaunch
public class TestSubstitute_TestWrappedItemMatchingAndDescriptionText_Test extends BaseTransformationTest {
@Test
public void test_TestSubstitute_TestWrappedItemMatchingAndDescriptionText() throws Throwable {
initTest("${mps_home}", "r:62873c84-7a76-488a-9b84-4e0ffdbec8db(jetbrains.mps.lang.editor.menus.substitute.tests.tests@tests)");
runTest("jetbrains.mps.lang.editor.menus.substitute.tests.tests.TestSubstitute_TestWrappedItemMatchingAndDescriptionText_Test$TestBody", "testMethod", false);
}
@MPSLaunch
public static class TestBody extends BaseEditorTestBody {
@Override
public void testMethodImpl() throws Exception {
initEditorComponent("5957872731948642296", "5957872731948642298");
String matchingText = "child matching text wrapper matching text";
List<SubstituteAction> matchingActions = getEditorComponent().getSelectedCell().getSubstituteInfo().getMatchingActions(matchingText, false);
Assert.assertTrue(matchingActions.size() == 1);
SubstituteAction action = matchingActions.get(0);
Assert.assertTrue(eq_hlg04n_a0a0f0a2_0(action.getDescriptionText(matchingText), "child description text wrapper description text") && eq_hlg04n_a0a0f0a2(action.getMatchingText(matchingText), matchingText));
typeString("child matching text wrapper matching text");
invokeAction("jetbrains.mps.ide.editor.actions.Complete_Action");
}
private static boolean eq_hlg04n_a0a0f0a2(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
private static boolean eq_hlg04n_a0a0f0a2_0(Object a, Object b) {
return (a != null ? a.equals(b) : a == b);
}
}
}