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);
}
Aggregations