public void CreateEdmTypeSerializer_ThrowsArgumentNull_EdmType()
        {
            DefaultODataSerializerProvider serializerProvider = new DefaultODataSerializerProvider();

            Assert.ThrowsArgumentNull(
                () => serializerProvider.CreateEdmTypeSerializer(edmType: null),
                "edmType");
        }
        public void CreateEdmTypeSerializer_ThrowsArgumentNull_EdmType()
        {
            DefaultODataSerializerProvider serializerProvider = new DefaultODataSerializerProvider();

            Assert.ThrowsArgumentNull(
                () => serializerProvider.CreateEdmTypeSerializer(edmType: null),
                "edmType");
        }
        public void CreateEdmTypeSerializer_Returns_Null_ForUnsupportedType()
        {
            // Arrange
            Mock<IEdmType> unsupportedEdmType = new Mock<IEdmType>();
            unsupportedEdmType.Setup(e => e.TypeKind).Returns(EdmTypeKind.None);
            Mock<IEdmTypeReference> unsupportedEdmTypeReference = new Mock<IEdmTypeReference>();
            unsupportedEdmTypeReference.Setup(e => e.Definition).Returns(unsupportedEdmType.Object);
            DefaultODataSerializerProvider serializerProvider = new DefaultODataSerializerProvider();

            // Act & Assert
            Assert.Null(serializerProvider.CreateEdmTypeSerializer(unsupportedEdmTypeReference.Object));
        }
        public void CreateEdmTypeSerializer_Returns_Null_ForUnsupportedType()
        {
            // Arrange
            Mock <IEdmType> unsupportedEdmType = new Mock <IEdmType>();

            unsupportedEdmType.Setup(e => e.TypeKind).Returns(EdmTypeKind.None);
            Mock <IEdmTypeReference> unsupportedEdmTypeReference = new Mock <IEdmTypeReference>();

            unsupportedEdmTypeReference.Setup(e => e.Definition).Returns(unsupportedEdmType.Object);
            DefaultODataSerializerProvider serializerProvider = new DefaultODataSerializerProvider();

            // Act & Assert
            Assert.Null(serializerProvider.CreateEdmTypeSerializer(unsupportedEdmTypeReference.Object));
        }