Ejemplo n.º 1
0
        public void ShouldCreateAndFilter()
        {
            IOrFilter  or;
            IAndFilter filter;

            or     = new OrFilter(JobTable.Description.IsEqualTo("test"), JobTable.Description.IsEqualTo("test"));
            filter = or.And(JobTable.Description.IsNull());
            Assert.AreEqual(2, filter.Members.Count());

            or     = new OrFilter(JobTable.Description.IsEqualTo("test"), JobTable.Description.IsEqualTo("test"));
            filter = or.And(JobTable.Description.IsNull().And(JobTable.Description.IsNull()));
            Assert.AreEqual(3, filter.Members.Count());

            or     = new OrFilter(JobTable.Description.IsEqualTo("test"), JobTable.Description.IsEqualTo("test"));
            filter = or.And(JobTable.Description.IsNull()).And(JobTable.Description.IsNull());
            Assert.AreEqual(3, filter.Members.Count());
        }