public void Create_Property_MapToInvalidProperty_Throws()
        {
            var definition = TestListDefinition.Create <Request, Item, Result2>();
            var expression = new SortColumnExpression <Request, Item, Result2>(x => x.Ordx);

            definition.SortColumnDefinition = expression;

            Factory.Invoking(x => x.Create(definition))
            .Should()
            .ThrowExactly <PropertyNotFoundException>();
        }
        public void Create_Name_DefaultValueByAttribute_Succeeds()
        {
            var definition = TestListDefinition.Create <Request2, Item, Result>();
            var expression = new SortColumnExpression <Request2, Item, Result>("Ordx");

            definition.SortColumnDefinition = expression;

            var configuration = Factory.Create(definition);

            configuration.RequestProperty.Name.Should().Be("Ordx");
            configuration.ResultProperty.Name.Should().Be("Ordx");
            configuration.DefaultValue.Should().Be("Text");
            configuration.Name.Should().BeNull();
        }
        public void Create_Property_MapTo_Property_Succeeds()
        {
            var definition = TestListDefinition.Create <Request, Item, Result2>();
            var expression = new SortColumnExpression <Request, Item, Result2>(x => x.Ordx);

            expression.MapTo(x => x.Sortx);
            definition.SortColumnDefinition = expression;

            var configuration = Factory.Create(definition);

            configuration.RequestProperty.Name.Should().Be("Ordx");
            configuration.ResultProperty.Name.Should().Be("Sortx");
            configuration.DefaultValue.Should().BeNull();
            configuration.Name.Should().BeNull();
        }