Example #1
0
        public virtual void testJobPhaseFromPhaseTime()
        {
            JDFDoc       d  = new JDFDoc("JDF");
            JDFAuditPool ap = d.getJDFRoot().getCreateAuditPool();
            JDFPhaseTime pt = ap.setPhase(EnumNodeStatus.InProgress, "dummy", null, null);
            JDFJobPhase  jp = di.createJobPhaseFromPhaseTime(pt);

            Assert.IsFalse(pt.hasChildElement(ElementName.MISDETAILS, null));
            JDFMISDetails misDetails = pt.appendMISDetails();

            misDetails.setWorkTypeDetails("FooBar");
            misDetails.setWorkType(EnumWorkType.Alteration);
            jp = di.createJobPhaseFromPhaseTime(pt);
            Assert.AreEqual(pt.getMISDetails().getWorkType(), jp.getMISDetails().getWorkType());
            Assert.IsTrue(jp.hasAttribute(AttributeName.PHASESTARTTIME));
        }