Ejemplo n.º 1
0
 public void PredicateIsSupported_ShouldPass(Expression <Func <FakeProjection, bool> > predicate)
 {
     //arrange
     //act
     PredicateGuard.PredicateIsSupported(predicate, "predicate");
     //assert
 }
Ejemplo n.º 2
0
        public void PredicateIsSupported_ShouldNotPass(Expression <Func <FakeProjection, bool> > predicate)
        {
            //arrange
            //act
            TestDelegate action = () => PredicateGuard.PredicateIsSupported(predicate, "predicate");

            //assert
            Assert.Catch(typeof(ArgumentException), action);
        }
Ejemplo n.º 3
0
        /*{
         *  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++;
            }
        }