Example #1
0
        public void Apply_DefaultAllowed()
        {
            var node = new FirstExpressionNode(CreateParseInfo(FirstExpressionNode.SupportedMethods[3].MakeGenericMethod(typeof(Cook))), null);

            node.Apply(QueryModel, ClauseGenerationContext);

            Assert.That(((FirstResultOperator)QueryModel.ResultOperators[0]).ReturnDefaultWhenEmpty, Is.True);
        }
Example #2
0
        public void Apply_DefaultAllowed()
        {
            var node = new FirstExpressionNode(CreateParseInfo(ReflectionUtility.GetMethod(() => Queryable.FirstOrDefault <Cook> (null, null))), null);

            node.Apply(QueryModel, ClauseGenerationContext);

            Assert.That(((FirstResultOperator)QueryModel.ResultOperators[0]).ReturnDefaultWhenEmpty, Is.True);
        }