Пример #1
0
//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(task, "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);
        }
Пример #2
0
//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);
        }