//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void batchExecutionJobShouldHaveDefaultPriority() public virtual void batchExecutionJobShouldHaveDefaultPriority() { // given Batch batch = helper.migrateProcessInstancesAsync(1); // when helper.executeSeedJob(batch); // then Job executionJob = helper.getExecutionJobs(batch)[0]; assertEquals(DefaultJobPriorityProvider.DEFAULT_PRIORITY, executionJob.Priority); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldSuspendExecutionJobsAndDefinition() public virtual void shouldSuspendExecutionJobsAndDefinition() { // given Batch batch = helper.migrateProcessInstancesAsync(1); helper.executeSeedJob(batch); // when managementService.suspendBatchById(batch.Id); // then JobDefinition migrationJobDefinition = helper.getExecutionJobDefinition(batch); assertTrue(migrationJobDefinition.Suspended); Job migrationJob = helper.getExecutionJobs(batch)[0]; assertTrue(migrationJob.Suspended); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void cannotMigrateInstanceWithoutTenantIdToDifferentTenant() public virtual void cannotMigrateInstanceWithoutTenantIdToDifferentTenant() { // given ProcessDefinition sourceDefinition = defaultTestRule.deployAndGetDefinition(ProcessModels.ONE_TASK_PROCESS); ProcessDefinition targetDefinition = defaultTestRule.deployForTenantAndGetDefinition(TENANT_ONE, ProcessModels.ONE_TASK_PROCESS); ProcessInstance processInstance = defaultEngineRule.RuntimeService.startProcessInstanceById(sourceDefinition.Id); MigrationPlan migrationPlan = defaultEngineRule.RuntimeService.createMigrationPlan(sourceDefinition.Id, targetDefinition.Id).mapEqualActivities().build(); Batch batch = defaultEngineRule.RuntimeService.newMigration(migrationPlan).processInstanceIds(Arrays.asList(processInstance.Id)).executeAsync(); batchHelper.executeSeedJob(batch); // when batchHelper.executeJobs(batch); // then Job migrationJob = batchHelper.getExecutionJobs(batch)[0]; Assert.assertThat(migrationJob.ExceptionMessage, CoreMatchers.containsString("Cannot migrate process instance '" + processInstance.Id + "' without tenant to a process definition with a tenant ('tenant1')")); }