check stub wellformedness after intention invocation in tests

This commit is contained in:
peter
2017-07-04 14:03:16 +02:00
parent 4d636b291d
commit ebe2d0b14d
@@ -30,6 +30,7 @@ import com.intellij.psi.PsiFile;
import com.intellij.psi.util.PsiUtil;
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
import com.intellij.testFramework.LightPlatformTestCase;
import com.intellij.testFramework.PsiTestUtil;
import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.ObjectUtils;
@@ -115,6 +116,9 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase
fail("Action '" + text + "' is still available after its invocation in test " + testFullPath);
}
}
PsiTestUtil.checkStubsMatchText(quickFix.getFile());
String expectedFilePath = ObjectUtils.notNull(quickFix.getBasePath(), "") + "/" + AFTER_PREFIX + testName;
quickFix.checkResultByFile("In file :" + expectedFilePath, expectedFilePath, false);