public void PredicateIsSupported_ShouldPass(Expression <Func <FakeProjection, bool> > predicate) { //arrange //act PredicateGuard.PredicateIsSupported(predicate, "predicate"); //assert }
public void PredicateIsSupported_ShouldNotPass(Expression <Func <FakeProjection, bool> > predicate) { //arrange //act TestDelegate action = () => PredicateGuard.PredicateIsSupported(predicate, "predicate"); //assert Assert.Catch(typeof(ArgumentException), action); }
/*{ * return Enumerable.Empty<TInternalProjection>().AsQueryable(); * }*/ private void GuardPredicatesContaineOnlyAllowedOperators(IEnumerable <Expression <Func <TProjection, bool> > > predicates) { var idx = 0; foreach (var predicate in predicates) { PredicateGuard.PredicateIsSupported(predicate, $"{nameof(predicates)}[{idx}]"); idx++; } }