public void GetAllDataTest() { // arrange UniLinkedList <int> llist = new UniLinkedList <int>(); llist.Add(1); llist.Add(2); llist.Add(3); int[] check = new int[] { 1, 2, 3 }; bool result = true; // act var list = llist.GetAllData().ToArray(); for (int i = 0, n = llist.Count - 1; i < n; i++) { if (list[i] != check[i]) { result = false; break; } } //asserts Assert.IsTrue(result); }