/// <summary>
 /// Compare the PofExtractor with another object to determine
 /// equality.
 /// </summary>
 /// <remarks>
 /// Two PofExtractor objects are considered equal iff their paths
 /// are equal and they have the same target (key or value).
 /// </remarks>
 /// <param name="o">
 /// Object to compare with
 /// </param>
 /// <returns>
 /// <b>true</b> iff this PofExtractor and the passed object are
 /// equivalent
 /// </returns>
 public override bool Equals(Object o)
 {
     if (this == o)
     {
         return(true);
     }
     if (o is PofExtractor)
     {
         PofExtractor that = (PofExtractor)o;
         return(m_target == that.m_target &&
                Equals(m_navigator, that.m_navigator));
     }
     return(false);
 }
        public void TestPofExtractorWithFilter()
        {
            INamedCache cache = CacheFactory.GetCache(CacheName);

            cache.Clear();
            for (int i = 1901; i <= 2000; i++)
            {
                PortablePersonLite customer = new PortablePersonLite();
                customer.Name = "Name" + i;
                customer.DOB  = new DateTime(i, 1, 1);
                cache.Insert(i, customer);
            }
            DateTime        criteria  = new DateTime(1970, 1, 1);
            IValueExtractor extractor = new PofExtractor(null, 2);
            IFilter         filter2   = new LessEqualsFilter(extractor, criteria);

            Assert.AreEqual(cache.GetEntries(filter2).Length, 70,
                            "Expected: 70; Result was: " + cache.GetEntries(filter2).Length);
            CacheFactory.Shutdown();
        }