use of org.jbpm.kie.services.impl.DeployedUnitImpl in project jbpm by kiegroup.
the class DeploymentServiceTest method testDeploymentOfMultipleVersions.
@Test
public void testDeploymentOfMultipleVersions() {
assertNotNull(deploymentService);
DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION);
DeploymentUnit deploymentUnit3 = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, "1.1.0-SNAPSHOT");
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
deploymentService.deploy(deploymentUnit3);
units.add(deploymentUnit3);
DeployedUnit deployed = deploymentService.getDeployedUnit(deploymentUnit.getIdentifier());
assertNotNull(deployed);
assertNotNull(deployed.getDeploymentUnit());
assertNotNull(deployed.getRuntimeManager());
assertEquals(0, ((DeployedUnitImpl) deployed).getDeployedClasses().size());
DeployedUnit deployed3 = deploymentService.getDeployedUnit(deploymentUnit3.getIdentifier());
assertNotNull(deployed3);
assertNotNull(deployed3.getDeploymentUnit());
assertNotNull(deployed3.getRuntimeManager());
assertEquals(1, ((DeployedUnitImpl) deployed3).getDeployedClasses().size());
assertNotNull(runtimeDataService);
Collection<ProcessDefinition> processes = runtimeDataService.getProcesses(new QueryContext());
assertNotNull(processes);
assertEquals(10, processes.size());
DeployedUnit deployedLatest = deploymentService.getDeployedUnit(GROUP_ID + ":" + ARTIFACT_ID + ":LATEST");
assertNotNull(deployedLatest);
assertNotNull(deployedLatest.getDeploymentUnit());
assertNotNull(deployedLatest.getRuntimeManager());
assertEquals(deploymentUnit3.getIdentifier(), deployedLatest.getDeploymentUnit().getIdentifier());
}
use of org.jbpm.kie.services.impl.DeployedUnitImpl in project jbpm by kiegroup.
the class DeploymentServiceEJBIntegrationTest method testDeploymentOfMultipleVersions.
@Test
public void testDeploymentOfMultipleVersions() {
assertNotNull(deploymentService);
DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION);
DeploymentUnit deploymentUnit3 = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, "1.1.0-SNAPSHOT");
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
deploymentService.deploy(deploymentUnit3);
units.add(deploymentUnit3);
DeployedUnit deployed = deploymentService.getDeployedUnit(deploymentUnit.getIdentifier());
assertNotNull(deployed);
assertNotNull(deployed.getDeploymentUnit());
assertNotNull(deployed.getRuntimeManager());
assertEquals(0, ((DeployedUnitImpl) deployed).getDeployedClasses().size());
DeployedUnit deployed3 = deploymentService.getDeployedUnit(deploymentUnit3.getIdentifier());
assertNotNull(deployed3);
assertNotNull(deployed3.getDeploymentUnit());
assertNotNull(deployed3.getRuntimeManager());
assertEquals(0, ((DeployedUnitImpl) deployed3).getDeployedClasses().size());
assertNotNull(runtimeDataService);
Collection<ProcessDefinition> processes = runtimeDataService.getProcesses(new QueryContext());
assertNotNull(processes);
assertEquals(10, processes.size());
DeployedUnit deployedLatest = deploymentService.getDeployedUnit(GROUP_ID + ":" + ARTIFACT_ID + ":LATEST");
assertNotNull(deployedLatest);
assertNotNull(deployedLatest.getDeploymentUnit());
assertNotNull(deployedLatest.getRuntimeManager());
assertEquals(deploymentUnit3.getIdentifier(), deployedLatest.getDeploymentUnit().getIdentifier());
}
Aggregations