//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Deployment public void testEntryCriteriaAndManualActivationDisabled() public virtual void testEntryCriteriaAndManualActivationDisabled() { // given string caseInstanceId = createCaseInstanceByKey(CASE_DEFINITION_KEY).Id; CaseExecutionQuery executionQuery = caseService.createCaseExecutionQuery(); string humanTask1Id = executionQuery.activityId("PI_HumanTask_1").singleResult().Id; // when (1) complete(humanTask1Id); // then (1) CaseInstanceQuery instanceQuery = caseService.createCaseInstanceQuery().caseInstanceId(caseInstanceId); CaseInstance caseInstance = instanceQuery.singleResult(); assertNotNull(caseInstance); assertTrue(caseInstance.Active); string humanTask2Id = executionQuery.activityId("PI_HumanTask_2").singleResult().Id; // when (2) complete(humanTask2Id); // then (2) caseInstance = instanceQuery.singleResult(); assertNotNull(caseInstance); assertTrue(caseInstance.Completed); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Deployment public void testManualActivationDisabled() public virtual void testManualActivationDisabled() { // given // a deployed case definition // when (1) string caseInstanceId = createCaseInstanceByKey(CASE_DEFINITION_KEY).Id; // then (1) CaseInstanceQuery instanceQuery = caseService.createCaseInstanceQuery().caseInstanceId(caseInstanceId); CaseInstance caseInstance = instanceQuery.singleResult(); assertNotNull(caseInstance); assertTrue(caseInstance.Active); CaseExecutionQuery executionQuery = caseService.createCaseExecutionQuery(); string humanTask2Id = executionQuery.activityId("PI_HumanTask_2").singleResult().Id; // when (2) caseService.completeCaseExecution(humanTask2Id); // then (2) caseInstance = instanceQuery.singleResult(); assertNotNull(caseInstance); assertTrue(caseInstance.Completed); // humanTask1 and humanTask2 are not available assertNull(executionQuery.activityId("PI_HumanTask_1").singleResult()); assertNull(executionQuery.activityId("PI_HumanTask_2").singleResult()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Deployment public void testRequiredEnabled() public virtual void testRequiredEnabled() { // given // a deployed case definition CaseExecutionQuery executionQuery = caseService.createCaseExecutionQuery(); CaseInstanceQuery instanceQuery = caseService.createCaseInstanceQuery(); // when (1) string caseInstanceId = createCaseInstanceByKey(CASE_DEFINITION_KEY).Id; // then (1) CaseInstance caseInstance = instanceQuery.caseInstanceId(caseInstanceId).singleResult(); assertNotNull(caseInstance); assertTrue(caseInstance.Active); string humanTask1Id = executionQuery.activityId("PI_HumanTask_1").singleResult().Id; manualStart(humanTask1Id); // when (2) complete(humanTask1Id); // then (2) caseInstance = instanceQuery.singleResult(); assertNotNull(caseInstance); assertTrue(caseInstance.Active); string humanTask2Id = executionQuery.activityId("PI_HumanTask_2").singleResult().Id; manualStart(humanTask2Id); // when (3) complete(humanTask2Id); // then (3) caseInstance = instanceQuery.singleResult(); assertNotNull(caseInstance); assertTrue(caseInstance.Completed); }