Example #1
0
        public virtual void testCopyToResponse()
        {
            JDFResponse    r  = JDFJMF.createJMF(JDFMessage.EnumFamily.Response, EnumType.AbortQueueEntry).getResponse(0);
            JDFQueueFilter qf = (JDFQueueFilter) new JDFDoc(ElementName.QUEUEFILTER).getRoot();

            qf.setMaxEntries(3);
            JDFQueue q2 = q.copyToResponse(r, qf);

            Assert.AreEqual(r.getQueue(0), q2);
            Assert.AreEqual(3, q2.numEntries(null));
            Assert.AreNotEqual(q, q2);
            Assert.IsTrue(q.numEntries(null) > 3);
            q2 = q.copyToResponse(r, qf);
            Assert.AreEqual(r.getQueue(0), q2);
            Assert.IsNull(r.getElement("Queue", null, 1));
            Assert.AreEqual(3, q2.numEntries(null));
            Assert.AreNotEqual(q, q2);
            Assert.IsTrue(q.numEntries(null) > 3);
        }