mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
Tests for commenter
This commit is contained in:
parent
08ed7e5cfa
commit
7b75239b14
@ -1,6 +1,7 @@
|
||||
package com.simpleplugin;
|
||||
|
||||
import com.intellij.codeInsight.completion.CompletionType;
|
||||
import com.intellij.codeInsight.generation.actions.CommentByLineCommentAction;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.codeStyle.CodeStyleManager;
|
||||
@ -54,4 +55,13 @@ public class SimpleCodeInsightTest extends LightCodeInsightFixtureTestCase {
|
||||
myFixture.renameElementAtCaret("websiteUrl");
|
||||
myFixture.checkResultByFile("RenameTestData.simple", "RenameTestDataAfter.simple", false);
|
||||
}
|
||||
|
||||
public void testCommenter() {
|
||||
myFixture.configureByText(SimpleFileType.INSTANCE, "<caret>website = http://en.wikipedia.org/");
|
||||
CommentByLineCommentAction commentAction = new CommentByLineCommentAction();
|
||||
commentAction.actionPerformedImpl(getProject(), myFixture.getEditor());
|
||||
myFixture.checkResult("#website = http://en.wikipedia.org/");
|
||||
commentAction.actionPerformedImpl(getProject(), myFixture.getEditor());
|
||||
myFixture.checkResult("website = http://en.wikipedia.org/");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user