public void ShouldBeParentProperty()
 {
     var _ = QueryReflectionHelper.GetOrRegistryProperty(typeof(MockQuery), "StringParentP");
     var a = QueryReflectionHelper
             .MappingJson2PropertyInfo[QueryReflectionHelper.CDefaultNamingStrategy]
             [typeof(MockQuery)]
             ["StringParentP"]
             .Should().NotBeNull();
 }
        /// <summary>
        ///     create in expression ( operator "=in=" )
        /// </summary>
        /// <returns></returns>
        public static Expression <Func <T, bool> > GetInExpression <T>(ParameterExpression parameter,
                                                                       RSqlQueryParser.ComparisonContext context,
                                                                       JsonNamingPolicy jsonNamingPolicy = null)
        {
            var expressionValue    = GetSelector <T>(parameter, context, jsonNamingPolicy);
            var values             = GetMultipleValue(expressionValue, context);
            var methodContainsInfo =
                QueryReflectionHelper.GetOrRegistryContainsMethodInfo(expressionValue.Property.PropertyType);

            return(Expression.Lambda <Func <T, bool> >(
                       Expression.Call(Expression.Constant(methodContainsInfo.Convert(values)),
                                       methodContainsInfo.ContainsMethod,
                                       expressionValue.Expression), parameter));
        }
 public void ShouldBeExcludeProperty()
 {
     QueryReflectionHelper.GetOrRegistryProperty(typeof(MockQuery), "excludeProperty")
     .Should()
     .BeNull();
 }