Esempio n. 1
0
        ///
        ///	 <summary> * append an action to this that references a Test with a term of type term
        ///	 * in the parallel TestPool
        ///	 *  </summary>
        ///	 * <param name="term">
        ///	 *            the type of term in the test </param>
        ///	 * <param name="bActionFailsOnTestTrue">
        ///	 *            if true the term is linked directly, if false a the term is
        ///	 *            inverted by enclosing it in a <not> term </param>
        ///
        public virtual JDFAction appendActionTest(EnumTerm term, bool bActionFailsOnTestTrue)
        {
            JDFAction   action   = appendAction();
            JDFTestPool testPool = (JDFTestPool)getParentNode_KElement().getCreateElement(ElementName.TESTPOOL);
            JDFTest     test     = null;

            if (bActionFailsOnTestTrue)
            {
                test = testPool.appendTestTerm(term);
            }
            else
            {
                test = testPool.appendTest();
                ((JDFnot)test.appendTerm(EnumTerm.not)).appendTerm(term);
            }
            action.setTest(test);
            return(action);
        }