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(); }
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(); }