Search in sources :

Example 1 with BuildSystemProviderWrapper

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

the class BlazeInstrumentationTestApkBuildStepIntegrationTest method setupBuildResultHelperProvider.

/**
 * Setup build result helper to return BEP output with test execroot by default.
 */
@Before
public void setupBuildResultHelperProvider() throws GetArtifactsException {
    mockBuildResultHelper = mock(BuildResultHelper.class);
    when(mockBuildResultHelper.getBuildOutput()).thenReturn(new ParsedBepOutput(null, getExecRoot(), null, null, 0, BuildResult.SUCCESS, 0));
    BuildSystemProviderWrapper buildSystem = new BuildSystemProviderWrapper(() -> getProject());
    buildSystem.setBuildResultHelperSupplier(() -> mockBuildResultHelper);
    registerExtension(BuildSystemProvider.EP_NAME, buildSystem);
}
Also used : BuildResultHelper(com.google.idea.blaze.base.command.buildresult.BuildResultHelper) ParsedBepOutput(com.google.idea.blaze.base.command.buildresult.ParsedBepOutput) BuildSystemProviderWrapper(com.google.idea.blaze.base.bazel.BuildSystemProviderWrapper) Before(org.junit.Before)

Example 2 with BuildSystemProviderWrapper

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

the class FullApkBuildStepIntegrationTest method setupBuildResultHelperProvider.

/**
 * Setup build result helper to return BEP output with test execroot by default.
 */
@Before
public void setupBuildResultHelperProvider() throws GetArtifactsException {
    mockBuildResultHelper = mock(BuildResultHelper.class);
    when(mockBuildResultHelper.getBuildOutput()).thenReturn(new ParsedBepOutput(null, getExecRoot(), null, null, 0, BuildResult.SUCCESS, 0));
    BuildSystemProviderWrapper buildSystem = new BuildSystemProviderWrapper(() -> getProject());
    buildSystem.setBuildResultHelperSupplier(() -> mockBuildResultHelper);
    registerExtension(BuildSystemProvider.EP_NAME, buildSystem);
}
Also used : BuildResultHelper(com.google.idea.blaze.base.command.buildresult.BuildResultHelper) ParsedBepOutput(com.google.idea.blaze.base.command.buildresult.ParsedBepOutput) BuildSystemProviderWrapper(com.google.idea.blaze.base.bazel.BuildSystemProviderWrapper) Before(org.junit.Before)

Example 3 with BuildSystemProviderWrapper

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

the class MobileInstallBuildStepIntegrationTest method setupBuildResultHelperProvider.

/**
 * Setup build result helper to return BEP output with test execroot by default.
 */
@Before
public void setupBuildResultHelperProvider() throws GetArtifactsException {
    mockBuildResultHelper = mock(BuildResultHelper.class);
    when(mockBuildResultHelper.getBuildOutput()).thenReturn(new ParsedBepOutput(null, getExecRoot(), null, null, 0, BuildResult.SUCCESS, 0));
    BuildSystemProviderWrapper buildSystem = new BuildSystemProviderWrapper(() -> getProject());
    buildSystem.setBuildResultHelperSupplier(() -> mockBuildResultHelper);
    registerExtension(BuildSystemProvider.EP_NAME, buildSystem);
}
Also used : BuildResultHelper(com.google.idea.blaze.base.command.buildresult.BuildResultHelper) ParsedBepOutput(com.google.idea.blaze.base.command.buildresult.ParsedBepOutput) BuildSystemProviderWrapper(com.google.idea.blaze.base.bazel.BuildSystemProviderWrapper) Before(org.junit.Before)

Aggregations

BuildSystemProviderWrapper (com.google.idea.blaze.base.bazel.BuildSystemProviderWrapper)3 BuildResultHelper (com.google.idea.blaze.base.command.buildresult.BuildResultHelper)3 ParsedBepOutput (com.google.idea.blaze.base.command.buildresult.ParsedBepOutput)3 Before (org.junit.Before)3