Exemplo n.º 1
0
 public void blah()
 {
     Expression<Func<Kase, object>> foo = x => x.Queue;
     var bb = new CollectionContainsPropertyOperation();
     var aa = bb.GetPredicateBuilder<Kase>(foo.GetMemberExpression(true));
     var caseToTest = new Kase{Queue = new Kueue{Name = "foo"}};
     var listOfQueues = new List<Kueue> {new Kueue {Name = "foo"}, new Kueue {Name = "bar"}};
     aa(listOfQueues).Compile()(caseToTest).ShouldBeTrue();
 }
Exemplo n.º 2
0
        public void blah()
        {
            Expression <Func <Kase, object> > foo = x => x.Queue;
            var bb         = new CollectionContainsPropertyOperation();
            var aa         = bb.GetPredicateBuilder <Kase>(foo.GetMemberExpression(true));
            var caseToTest = new Kase {
                Queue = new Kueue {
                    Name = "foo"
                }
            };
            var listOfQueues = new List <Kueue> {
                new Kueue {
                    Name = "foo"
                }, new Kueue {
                    Name = "bar"
                }
            };

            aa(listOfQueues).Compile()(caseToTest).ShouldBeTrue();
        }