//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testRequiredRuleByDefaultPlanItemControl() public virtual void testRequiredRuleByDefaultPlanItemControl() { // given PlanItemControl defaultControl = createElement(decisionTask, "ItemControl_1", typeof(DefaultControl)); RequiredRule requiredRule = createElement(defaultControl, "RequiredRule_1", typeof(RequiredRule)); ConditionExpression expression = createElement(requiredRule, "Expression_1", typeof(ConditionExpression)); expression.Text = "${true}"; Cmmn.validateModel(modelInstance); // when CmmnActivity newActivity = handler.handleElement(planItem, context); // then object rule = newActivity.getProperty(PROPERTY_REQUIRED_RULE); assertNotNull(rule); assertTrue(rule is CaseControlRule); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testManualActivationRule() public virtual void testManualActivationRule() { // given ItemControl itemControl = createElement(planItem, "ItemControl_1", typeof(ItemControl)); ManualActivationRule manualActivationRule = createElement(itemControl, "ManualActivationRule_1", typeof(ManualActivationRule)); ConditionExpression expression = createElement(manualActivationRule, "Expression_1", typeof(ConditionExpression)); expression.Text = "${true}"; Cmmn.validateModel(modelInstance); // when CmmnActivity newActivity = handler.handleElement(planItem, context); // then object rule = newActivity.getProperty(PROPERTY_MANUAL_ACTIVATION_RULE); assertNotNull(rule); assertTrue(rule is CaseControlRule); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testRepetitionRuleStandardEventsByDefaultPlanItemControl() public virtual void testRepetitionRuleStandardEventsByDefaultPlanItemControl() { // given PlanItemControl defaultControl = createElement(decisionTask, "DefaultControl_1", typeof(DefaultControl)); RepetitionRule repetitionRule = createElement(defaultControl, "RepititionRule_1", typeof(RepetitionRule)); ConditionExpression expression = createElement(repetitionRule, "Expression_1", typeof(ConditionExpression)); expression.Text = "${true}"; Cmmn.validateModel(modelInstance); // when CmmnActivity newActivity = handler.handleElement(planItem, context); // then IList <string> events = newActivity.Properties.get(CmmnProperties.REPEAT_ON_STANDARD_EVENTS); assertNotNull(events); assertEquals(2, events.Count); assertTrue(events.Contains([email protected]_Fields.COMPLETE)); assertTrue(events.Contains([email protected]_Fields.TERMINATE)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testRepetitionRuleCustomStandardEvents() public virtual void testRepetitionRuleCustomStandardEvents() { // given ItemControl itemControl = createElement(planItem, "ItemControl_1", typeof(ItemControl)); RepetitionRule repetitionRule = createElement(itemControl, "RepititionRule_1", typeof(RepetitionRule)); ConditionExpression expression = createElement(repetitionRule, "Expression_1", typeof(ConditionExpression)); expression.Text = "${true}"; repetitionRule.CamundaRepeatOnStandardEvent = [email protected]_Fields.DISABLE; Cmmn.validateModel(modelInstance); // when CmmnActivity newActivity = handler.handleElement(planItem, context); // then IList <string> events = newActivity.Properties.get(CmmnProperties.REPEAT_ON_STANDARD_EVENTS); assertNotNull(events); assertEquals(1, events.Count); assertTrue(events.Contains([email protected]_Fields.DISABLE)); }