public void GetProperties_ReturnsProperties_FromBaseAndDerived() { var properties = ConventionsHelpers.GetProperties(typeof(GetProperties_Derived)); var expectedProperties = new string[] { "Base_I", "Base_Complex", "Base_Str", "Derived_I", "Derived_Complex" }; Assert.Equal(expectedProperties.OrderByDescending(name => name), properties.Select(p => p.Name).OrderByDescending(name => name)); }
public void GetProperties_ReturnsProperties_FromBaseAndDerived() { Mock <IStructuralTypeConfiguration> edmType = new Mock <IStructuralTypeConfiguration>(); edmType.Setup(t => t.ClrType).Returns(typeof(GetProperties_Derived)); var properties = ConventionsHelpers.GetProperties(edmType.Object); var expectedProperties = new string[] { "Base_I", "Base_Complex", "Base_Str", "Derived_I", "Derived_Complex", "Collection", "PrivateSetPublicGet" }; Assert.Equal(expectedProperties.OrderByDescending(name => name), properties.Select(p => p.Name).OrderByDescending(name => name)); }