public void CopyToEmptyTest() { var list = new NodeList(); Node[] array = new Node[3]; list.CopyTo(array, 0); Assert.That(array, Is.All.Null); }
public void CopyToNotEmptyTest() { var node1 = new Node(); var node2 = new Node(); var node3 = new Node(); var list = new NodeList { node1, node2, node3 }; Node[] array = new Node[3]; list.CopyTo(array, 0); for (int i = 0; i < array.Length; i++) { Assert.That(array[i], Is.SameAs(list[i])); } }