Exemple #1
0
        public void ShouldCreateOrFilter()
        {
            IOrFilter or;
            IOrFilter filter;

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

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

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