Search in sources :

Example 21 with MockExperimentService

use of com.google.idea.common.experiments.MockExperimentService in project intellij by bazelbuild.

the class BlazeCommandTest method initTest.

@Override
protected void initTest(@NotNull Container applicationServices, @NotNull Container projectServices) {
    ExperimentService experimentService = new MockExperimentService();
    applicationServices.register(ExperimentService.class, experimentService);
    applicationServices.register(BlazeUserSettings.class, new BlazeUserSettings());
}
Also used : MockExperimentService(com.google.idea.common.experiments.MockExperimentService) BlazeUserSettings(com.google.idea.blaze.base.settings.BlazeUserSettings) ExperimentService(com.google.idea.common.experiments.ExperimentService) MockExperimentService(com.google.idea.common.experiments.MockExperimentService)

Example 22 with MockExperimentService

use of com.google.idea.common.experiments.MockExperimentService in project intellij by bazelbuild.

the class FileDifferTest method initTest.

@Override
protected void initTest(@NotNull Container applicationServices, @NotNull Container projectServices) {
    super.initTest(applicationServices, projectServices);
    applicationServices.register(ExperimentService.class, new MockExperimentService());
    applicationServices.register(BlazeExecutor.class, new MockBlazeExecutor());
    this.fileModificationProvider = new MockFileOperationProvider();
    applicationServices.register(FileOperationProvider.class, fileModificationProvider);
}
Also used : MockExperimentService(com.google.idea.common.experiments.MockExperimentService) MockBlazeExecutor(com.google.idea.blaze.base.async.executor.MockBlazeExecutor)

Example 23 with MockExperimentService

use of com.google.idea.common.experiments.MockExperimentService in project intellij by bazelbuild.

the class TestMapTest method initTest.

@Override
protected void initTest(@NotNull Container applicationServices, @NotNull Container projectServices) {
    super.initTest(applicationServices, projectServices);
    applicationServices.register(ExperimentService.class, new MockExperimentService());
    mockBlazeProjectDataManager = new MockBlazeProjectDataManager();
    projectServices.register(BlazeProjectDataManager.class, mockBlazeProjectDataManager);
    projectServices.register(SyncCache.class, new SyncCache(project));
    ExtensionPointImpl<SourceToTargetFinder> ep = registerExtensionPoint(SourceToTargetFinder.EP_NAME, SourceToTargetFinder.class);
    ep.registerExtension(new ProjectSourceToTargetFinder());
}
Also used : MockExperimentService(com.google.idea.common.experiments.MockExperimentService) SourceToTargetFinder(com.google.idea.blaze.base.run.SourceToTargetFinder) SyncCache(com.google.idea.blaze.base.sync.SyncCache)

Example 24 with MockExperimentService

use of com.google.idea.common.experiments.MockExperimentService in project intellij by bazelbuild.

the class LabelTest method initTest.

@Override
protected void initTest(@NotNull Container applicationServices, @NotNull Container projectServices) {
    super.initTest(applicationServices, projectServices);
    applicationServices.register(ExperimentService.class, new MockExperimentService());
}
Also used : MockExperimentService(com.google.idea.common.experiments.MockExperimentService)

Example 25 with MockExperimentService

use of com.google.idea.common.experiments.MockExperimentService in project intellij by bazelbuild.

the class BlazeGoRootsProviderTest method init.

@Before
public void init() {
    MockExperimentService experimentService = new MockExperimentService();
    experimentService.setExperiment(BlazeGoSupport.blazeGoSupportEnabled, true);
    registerApplicationComponent(ExperimentService.class, experimentService);
    fileOperationProvider = new MockFileOperationProvider();
    registerApplicationService(FileOperationProvider.class, fileOperationProvider);
}
Also used : MockExperimentService(com.google.idea.common.experiments.MockExperimentService) Before(org.junit.Before)

Aggregations

MockExperimentService (com.google.idea.common.experiments.MockExperimentService)25 BlazeImportSettingsManager (com.google.idea.blaze.base.settings.BlazeImportSettingsManager)8 MockBlazeExecutor (com.google.idea.blaze.base.async.executor.MockBlazeExecutor)6 Before (org.junit.Before)5 BuildSystemProvider (com.google.idea.blaze.base.bazel.BuildSystemProvider)4 BlazeExecutor (com.google.idea.blaze.base.async.executor.BlazeExecutor)3 BazelBuildSystemProvider (com.google.idea.blaze.base.bazel.BazelBuildSystemProvider)3 MockPrefetchService (com.google.idea.blaze.base.prefetch.MockPrefetchService)3 BlazeContext (com.google.idea.blaze.base.scope.BlazeContext)3 BlazeImportSettings (com.google.idea.blaze.base.settings.BlazeImportSettings)3 BlazeUserSettings (com.google.idea.blaze.base.settings.BlazeUserSettings)3 JavaLikeLanguage (com.google.idea.blaze.java.sync.source.JavaLikeLanguage)3 ExperimentService (com.google.idea.common.experiments.ExperimentService)3 VirtualFileSystemProvider (com.google.idea.blaze.base.io.VirtualFileSystemProvider)2 ProjectViewManager (com.google.idea.blaze.base.projectview.ProjectViewManager)2 BlazeCommandRunConfigurationHandlerProvider (com.google.idea.blaze.base.run.confighandler.BlazeCommandRunConfigurationHandlerProvider)2 TargetFinder (com.google.idea.blaze.base.run.targetfinder.TargetFinder)2 ArtifactLocationDecoder (com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder)2 JavaSourcePackageReader (com.google.idea.blaze.java.sync.source.JavaSourcePackageReader)2 PackageManifestReader (com.google.idea.blaze.java.sync.source.PackageManifestReader)2