public async Task CanDeepCopyList(int nodesCount) { var head = ListNodesGenerator.GenerateList(nodesCount); var copy = await _serializer.DeepCopy(head); CompareList(head, copy); }
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); }