Is there any point Unit testing serialization?

后端 未结 13 938
慢半拍i
慢半拍i 2021-02-01 23:38

I have a class that serializes a set of objects (using XML serialization) that I want to unit test.

My problem is it feels like I will be testing the .NET implementation

13条回答
  •  北荒
    北荒 (楼主)
    2021-02-02 00:21

    If the format of the serialized XML matters, then you need to test the serialization. If it's important that you can deserialize it, then you need to test deserialization.

提交回复
热议问题