Commit 4c4233c1 authored by Tagir Valeev's avatar Tagir Valeev
Browse files

GenerateJavadocTest => LightCodeInsightTestCase

parent 5166ad7a
Showing with 15 additions and 13 deletions
+15 -13
...@@ -15,36 +15,38 @@ ...@@ -15,36 +15,38 @@
*/ */
package com.intellij.java.codeInsight; package com.intellij.java.codeInsight;
import com.intellij.codeInsight.CodeInsightTestCase;
import com.intellij.ide.DataManager; import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.IdeActions; import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.editor.actionSystem.EditorActionHandler; import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
import com.intellij.openapi.editor.actionSystem.EditorActionManager; import com.intellij.openapi.editor.actionSystem.EditorActionManager;
import com.intellij.testFramework.LightCodeInsightTestCase;
import com.intellij.testFramework.PlatformTestCase; import com.intellij.testFramework.PlatformTestCase;
/** /**
* @author mike * @author mike
*/ */
@PlatformTestCase.WrapInCommand @PlatformTestCase.WrapInCommand
public class GenerateJavadocTest extends CodeInsightTestCase { public class GenerateJavadocTest extends LightCodeInsightTestCase {
public void test1() throws Exception { doTest(); } public void test1() { doTest(); }
public void test2() throws Exception { doTest(); } public void test2() { doTest(); }
public void test3() throws Exception { doTest(); } public void test3() { doTest(); }
public void testIdeadev2328() throws Exception { doTest(); } public void testIdeadev2328() { doTest(); }
public void testIdeadev2328_2() throws Exception { doTest(); } public void testIdeadev2328_2() { doTest(); }
public void testBeforeCommentedJavadoc() throws Exception { doTest(); } public void testBeforeCommentedJavadoc() { doTest(); }
public void testDoubleSlashInJavadoc() throws Exception { doTest(); } public void testDoubleSlashInJavadoc() { doTest(); }
private void doTest() throws Exception { private void doTest() {
String name = getTestName(false); String name = getTestName(false);
configureByFile("/codeInsight/generateJavadoc/before" + name + ".java"); configureByFile("/codeInsight/generateJavadoc/before" + name + ".java");
performAction(); performAction();
checkResultByFile("/codeInsight/generateJavadoc/after" + name + ".java", false); checkResultByFile("/codeInsight/generateJavadoc/after" + name + ".java");
} }
private void performAction() { private static void performAction() {
EditorActionManager actionManager = EditorActionManager.getInstance(); EditorActionManager actionManager = EditorActionManager.getInstance();
EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_ENTER); EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_ENTER);
actionHandler.execute(myEditor, DataManager.getInstance().getDataContext()); DataContext context = DataManager.getInstance().getDataContext(myEditor.getComponent());
actionHandler.execute(myEditor, myEditor.getCaretModel().getCurrentCaret(), context);
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment