示例#1
0
        public async Task CanDeepCopyList(int nodesCount)
        {
            var head = ListNodesGenerator.GenerateList(nodesCount);

            var copy = await _serializer.DeepCopy(head);

            CompareList(head, copy);
        }
示例#2
0
        public async Task CanSerializeAndDeserializeList(int nodesCount)
        {
            var head = ListNodesGenerator.GenerateList(nodesCount);

            using var stream = new MemoryStream();

            await _serializer.Serialize(head, stream);

            stream.Seek(0, SeekOrigin.Begin);
            var copy = await _serializer.Deserialize(stream);

            CompareList(head, copy);
        }