Search in sources :

Example 1 with MockChangeListManager

use of com.intellij.testFramework.vcs.MockChangeListManager 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)

Example 2 with MockChangeListManager

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

the class LocalChangesUnderRootsTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myChangeListManager = new MockChangeListManager();
    myBaseDir = myProject.getBaseDir();
    myLocalChangesUnderRoots = new LocalChangesUnderRoots(myChangeListManager, ProjectLevelVcsManager.getInstance(myProject));
}
Also used : MockChangeListManager(com.intellij.testFramework.vcs.MockChangeListManager) LocalChangesUnderRoots(com.intellij.openapi.vcs.impl.LocalChangesUnderRoots)

Aggregations

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