Example #1
0
 ///
 ///	 <summary> * return true if this qe matches the input QueueFilter
 ///	 *  </summary>
 ///	 * <param name="ni">
 ///	 * @return </param>
 ///
 public virtual bool matchesQueueFilter(JDFQueueFilter filter)
 {
     if (filter == null)
     {
         return(true);
     }
     return(filter.matches(this));
 }
Example #2
0
        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 ");
        }