use of org.guvnor.common.services.project.builder.model.BuildResults in project kie-wb-common by kiegroup.
the class ResourceChangeIncrementalBuilderWithoutFullBuildTest method testResourceDeleted.
@Test
public void testResourceDeleted() throws Exception {
final Bean buildChangeListenerBean = (Bean) beanManager.getBeans(org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder.class).iterator().next();
final CreationalContext cc = beanManager.createCreationalContext(buildChangeListenerBean);
final org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder buildChangeListener = (org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder) beanManager.getReference(buildChangeListenerBean, org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder.class, cc);
final URL resourceUrl = this.getClass().getResource("/BuildChangeListenerRepo/src/main/resources/delete.drl");
final org.uberfire.java.nio.file.Path nioResourcePath = fs.getPath(resourceUrl.toURI());
final Path resourcePath = paths.convert(nioResourcePath);
// Perform incremental build (Without a full Build first)
buildChangeListener.deleteResource(resourcePath);
waitForBuildResults(buildResultsObserver);
final BuildResults buildResults = buildResultsObserver.getBuildResults();
assertNotNull(buildResults);
assertEquals(0, buildResults.getErrorMessages().size());
assertEquals(1, buildResults.getInformationMessages().size());
final IncrementalBuildResults incrementalBuildResults = buildResultsObserver.getIncrementalBuildResults();
assertNull(incrementalBuildResults);
}
use of org.guvnor.common.services.project.builder.model.BuildResults in project kie-wb-common by kiegroup.
the class BuildServiceHelperTest method testLocalBuildAndDeployForced.
@Test
public void testLocalBuildAndDeployForced() {
prepareBuildAndDeploy(module, LocalBuildConfig.DeploymentType.FORCED, false);
BuildResults result = serviceHelper.localBuildAndDeploy(module, DeploymentMode.FORCED, false);
verifyBuildAndDeploy(result);
}
use of org.guvnor.common.services.project.builder.model.BuildResults in project kie-wb-common by kiegroup.
the class BuildServiceHelperTest method testLocalBuild.
@Test
public void testLocalBuild() {
prepareLocalFullBuild();
when(localBinaryConfig.getBuildResults()).thenReturn(buildResults);
BuildResults result = serviceHelper.localBuild(module);
assertEquals(buildResults, result);
verify(pipelineInvoker, times(1)).invokeLocalBuildPipeLine(eq(expectedRequest), any(Consumer.class));
}
use of org.guvnor.common.services.project.builder.model.BuildResults in project kie-wb-common by kiegroup.
the class BuildServiceImplTest method testBuildAndDeployWithSuppressHandlers.
@Test
public void testBuildAndDeployWithSuppressHandlers() {
prepareBuildAndDeploy(module, DeploymentMode.VALIDATED, false);
BuildResults result = buildService.buildAndDeploy(module, false);
assertEquals(buildResults, result);
verifyBuildAndDeploy(module, DeploymentMode.VALIDATED, false);
}
use of org.guvnor.common.services.project.builder.model.BuildResults in project kie-wb-common by kiegroup.
the class BuildServiceImplTest method testBuildAndDeployWithDeploymentModeAndSuppressHandlers.
@Test
public void testBuildAndDeployWithDeploymentModeAndSuppressHandlers() {
prepareBuildAndDeploy(module, DeploymentMode.VALIDATED, false);
BuildResults result = buildService.buildAndDeploy(module, false, DeploymentMode.VALIDATED);
assertEquals(buildResults, result);
verifyBuildAndDeploy(module, DeploymentMode.VALIDATED, false);
}
Aggregations