Search in sources :

Example 1 with MockVcsContextFactory

use of com.intellij.testFramework.vcs.MockVcsContextFactory in project intellij-community by JetBrains.

the class ReformatOnlyVcsChangedTextTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    myWorkingDirectory = TestFileStructure.createDirectory(getProject(), getSourceRoot(), TEMP_DIR_NAME);
    myRealChangeListManager = ChangeListManager.getInstance(getProject());
    myMockChangeListManager = new MockChangeListManager();
    registerChangeListManager(myMockChangeListManager);
    myRealCodeStyleManger = CodeStyleManager.getInstance(getProject());
    myMockCodeStyleManager = new MockCodeStyleManager();
    registerCodeStyleManager(myMockCodeStyleManager);
    myRealVcsContextFactory = ServiceManager.getService(VcsContextFactory.class);
    registerVcsContextFactory(new MockVcsContextFactory(getSourceRoot().getFileSystem()));
    myMockPlainTextFormattingModelBuilder = new MockPlainTextFormattingModelBuilder();
    LanguageFormatting.INSTANCE.addExplicitExtension(PlainTextLanguage.INSTANCE, myMockPlainTextFormattingModelBuilder);
    myMockPlainTextImportOptimizer = new MockPlainTextImportOptimizer();
    LanguageImportStatements.INSTANCE.addExplicitExtension(PlainTextLanguage.INSTANCE, myMockPlainTextImportOptimizer);
}
Also used : VcsContextFactory(com.intellij.openapi.vcs.actions.VcsContextFactory) MockVcsContextFactory(com.intellij.testFramework.vcs.MockVcsContextFactory) MockVcsContextFactory(com.intellij.testFramework.vcs.MockVcsContextFactory) MockChangeListManager(com.intellij.testFramework.vcs.MockChangeListManager)

Aggregations

VcsContextFactory (com.intellij.openapi.vcs.actions.VcsContextFactory)1 MockChangeListManager (com.intellij.testFramework.vcs.MockChangeListManager)1 MockVcsContextFactory (com.intellij.testFramework.vcs.MockVcsContextFactory)1