public virtual void testFlushQueue() { JDFQueueFilter qf = (JDFQueueFilter) new JDFDoc(ElementName.QUEUEFILTER).getRoot(); qf.appendQueueEntryDef("qe5"); VElement v = q.flushQueue(qf); Assert.AreEqual(1, v.Count); Assert.AreEqual("qe5", ((JDFQueueEntry)v[0]).getQueueEntryID()); Assert.AreEqual(4, q.numEntries(null)); }
public virtual void testMatches() { JDFQueueEntry qe = theQueue.appendQueueEntry(); Assert.IsTrue(filter.matches(qe), "both empty "); qe.setDeviceID("d1"); qe.setQueueEntryID("qe1"); filter.appendDevice("qe1"); Assert.IsFalse(filter.matches(qe), "no device "); filter.appendDevice("d1"); Assert.IsTrue(filter.matches(qe), " device "); filter.appendQueueEntryDef("qe2"); Assert.IsFalse(filter.matches(qe), "no qentryID "); filter.appendQueueEntryDef("qe1"); Assert.IsTrue(filter.matches(qe), "qentryID "); filter.setQueueEntryDetails(EnumQueueEntryDetails.None); Assert.IsFalse(filter.matches(qe), "details=none never matches "); }
/// /// <summary> * create a queuefilter from the zapped queuentries /// * </summary> /// * <param name="zapped"> vector of <seealso cref="JDFQueueEntry"/> </param> /// public virtual void setQueueEntryDefsFromQE(VElement zapped) { if (zapped != null) { int zs = zapped.Count; JDFQueueFilter qf = appendQueueFilter(); for (int i = 0; i < zs; i++) { qf.appendQueueEntryDef(((JDFQueueEntry)zapped[i]).getQueueEntryID()); } } }