public void EnumType_returns_type_when_enum_property() { var enumType = new EnumType(); var property = EdmProperty.CreateEnum("P", enumType); Assert.Same(enumType, property.EnumType); }
public void IsEnumType_returns_true_when_enum_property() { var enumType = new EnumType(); var property = EdmProperty.CreateEnum("P", enumType); Assert.False(property.IsComplexType); Assert.False(property.IsPrimitiveType); Assert.True(property.IsEnumType); }
public void Enum_should_create_enum_property() { var enumType = new EnumType(); var property = EdmProperty.CreateEnum("P", enumType); Assert.NotNull(property); Assert.NotNull(property.TypeUsage); Assert.Same(enumType, property.TypeUsage.EdmType); }
public void IsUnderlyingPrimitiveType_returns_true_when_underlying_primitive_property() { var primitiveType = PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Int32); var property = EdmProperty.CreatePrimitive("P", primitiveType); Assert.True(property.IsUnderlyingPrimitiveType); var enumType = new EnumType(); property = EdmProperty.CreateEnum("P", enumType); Assert.True(property.IsUnderlyingPrimitiveType); }
public void UnderlyingPrimitiveType_returns_type_when_underlying_primitive_property() { var primitiveType = PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Int32); var property = EdmProperty.CreatePrimitive("P", primitiveType); Assert.Same(primitiveType, property.UnderlyingPrimitiveType); var enumType = new EnumType(); property = EdmProperty.CreateEnum("P", enumType); Assert.Same(primitiveType, property.UnderlyingPrimitiveType); var complexType = new ComplexType(); property = EdmProperty.CreateComplex("P", complexType); Assert.Null(property.UnderlyingPrimitiveType); }