public void Property_IsNotNavigable_SetsUnsortableAndNonFilterable()
        {
            // Arrange
            StructuralTypeConfiguration structuralType = Mock.Of<StructuralTypeConfiguration>();
            Mock<PropertyInfo> propertyInfo = new Mock<PropertyInfo>();
            propertyInfo.SetupGet(p => p.PropertyType).Returns(typeof(int));
            PropertyConfiguration property = new PrimitivePropertyConfiguration(propertyInfo.Object, structuralType);

            // Act
            property.IsNotNavigable();

            // Assert
            Assert.True(property.NonFilterable);
            Assert.True(property.Unsortable);
        }
Exemplo n.º 2
0
        public void Property_IsNotNavigable_SetsNotSortableAndNotFilterable()
        {
            // Arrange
            StructuralTypeConfiguration structuralType = Mock.Of <StructuralTypeConfiguration>();
            Mock <PropertyInfo>         propertyInfo   = new Mock <PropertyInfo>();

            propertyInfo.SetupGet(p => p.PropertyType).Returns(typeof(int));
            PropertyConfiguration property = new PrimitivePropertyConfiguration(propertyInfo.Object, structuralType);

            // Act
            property.IsNotNavigable();

            // Assert
            Assert.True(property.NotFilterable);
            Assert.True(property.NotSortable);
        }