public void GetODataSerializer_ThrowsArgumentNull_EdmType() { // Arrange DefaultODataSerializerProvider serializerProvider = new DefaultODataSerializerProvider(); // Act & Assert Assert.ThrowsArgumentNull( () => serializerProvider.SetEdmTypeSerializer(edmType: null, serializer: null), "edmType"); }
public void GetEdmTypeSerializer_Returns_SetEdmTypeSerializerInput() { // Arrange DefaultODataSerializerProvider serializerProvider = new DefaultODataSerializerProvider(); IEdmTypeReference edmType = EdmCoreModel.Instance.GetInt32(isNullable: true); ODataEdmTypeSerializer serializer = new Mock <ODataEdmTypeSerializer>(edmType, ODataPayloadKind.Property).Object; serializerProvider.SetEdmTypeSerializer(edmType, serializer); // Act & Assert Assert.Same(serializer, serializerProvider.GetEdmTypeSerializer(edmType)); }
public void GetEdmTypeSerializer_Returns_SetEdmTypeSerializerInput() { // Arrange DefaultODataSerializerProvider serializerProvider = new DefaultODataSerializerProvider(); IEdmTypeReference edmType = EdmCoreModel.Instance.GetInt32(isNullable: true); ODataEntrySerializer serializer = new Mock<ODataEntrySerializer>(edmType, ODataPayloadKind.Property).Object; serializerProvider.SetEdmTypeSerializer(edmType, serializer); // Act & Assert Assert.Same(serializer, serializerProvider.GetEdmTypeSerializer(edmType)); }
public void GetODataSerializer_ThrowsArgumentNull_EdmType() { // Arrange DefaultODataSerializerProvider serializerProvider = new DefaultODataSerializerProvider(); // Act & Assert Assert.ThrowsArgumentNull( () => serializerProvider.SetEdmTypeSerializer(edmType: null, serializer: null), "edmType"); }