public void Property_IsNavigable_DoesntSetSortableAndFilterable() { // 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); property.IsNonFilterable(); property.IsUnsortable(); // Act property.IsNavigable(); // Assert Assert.True(property.NonFilterable); Assert.True(property.Unsortable); }
public void Property_IsNavigable_DoesntSetSortableAndFilterable() { // 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); property.IsNotFilterable(); property.IsNotSortable(); // Act property.IsNavigable(); // Assert Assert.True(property.NotFilterable); Assert.True(property.NotSortable); }