public void DLLe_ToArray_EmptyList_ShouldReturnEmptyArray() { // Arrange var list = new DoublyLinkedListExpanded <string>(); // Act var arr = list.ToArray(); // Assert CollectionAssert.AreEqual(arr, new List <string>() { }); }
public void DLLe_ToArray_NonEmptyList_ShouldReturnArray() { // Arrange var list = new DoublyLinkedListExpanded <string>(); list.AddLast("Five"); list.AddLast("Six"); list.AddLast("Seven"); // Act var arr = list.ToArray(); // Assert CollectionAssert.AreEqual(arr, new string[] { "Five", "Six", "Seven" }); }