Example #1
0
        public void ReferenceTypeIsNullCondition()
        {
            var isNullCondition = new ReferenceTypeIsNullCondition <string>
            {
                Value = new FilterValue <string>
                {
                    LeftValue = "1"
                }
            };

            var expr1 = isNullCondition.For <TestSource>(x => x.Name);

            Assert.IsFalse(expr1.Compile()(new TestSource {
                Name = "1"
            }));

            Assert.IsTrue(expr1.Compile()(new TestSource {
                Name = null
            }));
        }