public void ComplexType_returns_type_when_complex_property() { var complexType = new ComplexType(); var property = EdmProperty.Complex("P", complexType); Assert.Same(complexType, property.ComplexType); }
public void IsComplexType_returns_true_when_complex_property() { var complexType = new ComplexType(); var property = EdmProperty.Complex("P", complexType); Assert.False(property.IsPrimitiveType); Assert.False(property.IsEnumType); Assert.True(property.IsComplexType); }
public void Complex_should_create_complex_property() { var complexType = new ComplexType(); var property = EdmProperty.Complex("P", complexType); Assert.NotNull(property); Assert.NotNull(property.TypeUsage); Assert.Same(complexType, property.TypeUsage.EdmType); }
public void UnderlyingPrimitiveType_returns_type_when_underlying_primitive_property() { var primitiveType = PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Int32); var property = EdmProperty.Primitive("P", primitiveType); Assert.Same(primitiveType, property.UnderlyingPrimitiveType); var enumType = new EnumType(); property = EdmProperty.Enum("P", enumType); Assert.Same(primitiveType, property.UnderlyingPrimitiveType); var complexType = new ComplexType(); property = EdmProperty.Complex("P", complexType); Assert.Null(property.UnderlyingPrimitiveType); }