Search in sources :

Example 1 with MockInputStreamProvider

use of com.google.idea.blaze.base.io.MockInputStreamProvider in project intellij by bazelbuild.

the class ScalaSourceDirectoryCalculatorTest method initTest.

@Override
protected void initTest(Container applicationServices, Container projectServices) {
    super.initTest(applicationServices, projectServices);
    mockInputStreamProvider = new MockInputStreamProvider();
    applicationServices.register(InputStreamProvider.class, mockInputStreamProvider);
    applicationServices.register(JavaSourcePackageReader.class, new JavaSourcePackageReader());
    applicationServices.register(PackageManifestReader.class, new PackageManifestReader());
    applicationServices.register(PrefetchService.class, new MockPrefetchService());
    ExtensionPoint<JavaLikeLanguage> javaLikeLanguages = registerExtensionPoint(JavaLikeLanguage.EP_NAME, JavaLikeLanguage.class);
    javaLikeLanguages.registerExtension(new JavaLikeLanguage.Java());
    javaLikeLanguages.registerExtension(new ScalaJavaLikeLanguage());
    context.addOutputSink(IssueOutput.class, issues);
    sourceDirectoryCalculator = new SourceDirectoryCalculator();
}
Also used : MockPrefetchService(com.google.idea.blaze.base.prefetch.MockPrefetchService) MockInputStreamProvider(com.google.idea.blaze.base.io.MockInputStreamProvider) ScalaJavaLikeLanguage(com.google.idea.blaze.scala.sync.source.ScalaJavaLikeLanguage) ScalaJavaLikeLanguage(com.google.idea.blaze.scala.sync.source.ScalaJavaLikeLanguage)

Example 2 with MockInputStreamProvider

use of com.google.idea.blaze.base.io.MockInputStreamProvider in project intellij by bazelbuild.

the class SourceDirectoryCalculatorTest method initTest.

@Override
protected void initTest(Container applicationServices, Container projectServices) {
    super.initTest(applicationServices, projectServices);
    mockInputStreamProvider = new MockInputStreamProvider();
    applicationServices.register(InputStreamProvider.class, mockInputStreamProvider);
    applicationServices.register(JavaSourcePackageReader.class, new JavaSourcePackageReader());
    applicationServices.register(PackageManifestReader.class, new PackageManifestReader());
    applicationServices.register(FileOperationProvider.class, new MockFileOperationProvider());
    context.addOutputSink(IssueOutput.class, issues);
    sourceDirectoryCalculator = new SourceDirectoryCalculator();
    BlazeExecutor blazeExecutor = new MockBlazeExecutor();
    applicationServices.register(BlazeExecutor.class, blazeExecutor);
    experimentService = new MockExperimentService();
    applicationServices.register(ExperimentService.class, experimentService);
    applicationServices.register(PrefetchService.class, new MockPrefetchService());
    registerExtensionPoint(JavaLikeLanguage.EP_NAME, JavaLikeLanguage.class).registerExtension(new JavaLikeLanguage.Java());
}
Also used : MockExperimentService(com.google.idea.common.experiments.MockExperimentService) MockPrefetchService(com.google.idea.blaze.base.prefetch.MockPrefetchService) MockInputStreamProvider(com.google.idea.blaze.base.io.MockInputStreamProvider) MockBlazeExecutor(com.google.idea.blaze.base.async.executor.MockBlazeExecutor) BlazeExecutor(com.google.idea.blaze.base.async.executor.BlazeExecutor) MockBlazeExecutor(com.google.idea.blaze.base.async.executor.MockBlazeExecutor)

Example 3 with MockInputStreamProvider

use of com.google.idea.blaze.base.io.MockInputStreamProvider in project intellij by bazelbuild.

the class BuildEventProtocolTestFinderStrategyTest method initTest.

@Override
protected void initTest(Container applicationServices, Container projectServices) {
    inputStreamProvider = new MockInputStreamProvider();
    applicationServices.register(InputStreamProvider.class, inputStreamProvider);
}
Also used : MockInputStreamProvider(com.google.idea.blaze.base.io.MockInputStreamProvider)

Aggregations

MockInputStreamProvider (com.google.idea.blaze.base.io.MockInputStreamProvider)3 MockPrefetchService (com.google.idea.blaze.base.prefetch.MockPrefetchService)2 BlazeExecutor (com.google.idea.blaze.base.async.executor.BlazeExecutor)1 MockBlazeExecutor (com.google.idea.blaze.base.async.executor.MockBlazeExecutor)1 ScalaJavaLikeLanguage (com.google.idea.blaze.scala.sync.source.ScalaJavaLikeLanguage)1 MockExperimentService (com.google.idea.common.experiments.MockExperimentService)1