public void AssertNonHandleable(string propertyName)
        {
            var handler  = new SimplePropertyTypePredicateHandler <FilterWithNonSimpleProps, Entity>();
            var property = typeof(FilterWithNonSimpleProps).GetProperty(propertyName);
            var result   = handler.CanHandle(property);

            Assert.False(result);
        }
        public void HandleShouldReturnNullForEmptyProperties(string propertyName)
        {
            var handler  = new SimplePropertyTypePredicateHandler <FilterWithNullableSimpleProps, Entity>();
            var property = typeof(FilterWithNullableSimpleProps).GetProperty(propertyName);
            var filter   = new FilterWithNullableSimpleProps();
            var result   = handler.Handle(filter, property);

            Assert.Null(result);
        }
        public void HandleShouldReturnExpectedResult(string propertyName)
        {
            var handler  = new SimplePropertyTypePredicateHandler <FilterWithSimpleProps, Entity>();
            var property = typeof(FilterWithSimpleProps).GetProperty(propertyName);
            var filter   = new FilterWithSimpleProps
            {
                StringProp = "" // needs to be set, since default == null
            };
            var result = handler.Handle(filter, property);

            Assert.Matches($@"x => \(x\.{property.Name} == .+\)", result.ToString());
        }