예제 #1
0
        public void DLLe_ToArray_EmptyList_ShouldReturnEmptyArray()
        {
            // Arrange
            var list = new DoublyLinkedListExpanded <string>();

            // Act
            var arr = list.ToArray();

            // Assert
            CollectionAssert.AreEqual(arr, new List <string>()
            {
            });
        }
예제 #2
0
        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" });
        }