Search in sources :

Example 1 with MockEventLoggingService

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

the class BlazeSyncIntegrationTestCase method doSetup.

@Before
public void doSetup() throws Exception {
    thisClassDisposable = Disposer.newDisposable();
    projectViewManager = new MockProjectViewManager(getProject(), thisClassDisposable);
    new MockBlazeVcsHandler(thisClassDisposable);
    blazeInfoData = new MockBlazeInfoRunner();
    blazeIdeInterface = new MockBlazeIdeInterface();
    eventLogger = new MockEventLoggingService(thisClassDisposable);
    moduleMocker = new ProjectModuleMocker(getProject(), thisClassDisposable);
    registerApplicationService(BlazeInfoRunner.class, blazeInfoData);
    registerApplicationService(BlazeIdeInterface.class, blazeIdeInterface);
    errorCollector = new ErrorCollector();
    context = new BlazeContext();
    context.addOutputSink(IssueOutput.class, errorCollector);
    fileSystem.createDirectory(projectDataDirectory.getPath() + "/.blaze/modules");
    blazeInfoData.setResults(ImmutableMap.<String, String>builder().put(BlazeInfo.blazeBinKey(Blaze.getBuildSystem(getProject())), BLAZE_BIN).put(BlazeInfo.blazeGenfilesKey(Blaze.getBuildSystem(getProject())), BLAZE_GENFILES).put(BlazeInfo.EXECUTION_ROOT_KEY, EXECUTION_ROOT).put(BlazeInfo.OUTPUT_BASE_KEY, OUTPUT_BASE).put(BlazeInfo.OUTPUT_PATH_KEY, OUTPUT_PATH).put(BlazeInfo.PACKAGE_PATH_KEY, workspaceRoot.toString()).build());
}
Also used : MockProjectViewManager(com.google.idea.blaze.base.MockProjectViewManager) BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) MockEventLoggingService(com.google.idea.blaze.base.MockEventLoggingService) ErrorCollector(com.google.idea.blaze.base.scope.ErrorCollector) Before(org.junit.Before)

Aggregations

MockEventLoggingService (com.google.idea.blaze.base.MockEventLoggingService)1 MockProjectViewManager (com.google.idea.blaze.base.MockProjectViewManager)1 BlazeContext (com.google.idea.blaze.base.scope.BlazeContext)1 ErrorCollector (com.google.idea.blaze.base.scope.ErrorCollector)1 Before (org.junit.Before)1