コード例 #1
0
 public void AddListToStart_WhenMethodCalled_ReturnArgumentException(int[] actualArray, int[] arrayForList)
 {
     Assert.Throws <ArgumentException>(() =>
     {
         DoubleLinkedList actual = DoubleLinkedList.Create(actualArray);
         DoubleLinkedList list   = DoubleLinkedList.Create(arrayForList);
         actual.AddDoubleLinkedListToStart(list);
     });
 }
コード例 #2
0
        public void AddListToStart_WhenListPassed_ThenAddLisToStart(int[] actualArray, int[] arrayForList, int[] expectedArray)
        {
            DoubleLinkedList actual            = DoubleLinkedList.Create(actualArray);
            DoubleLinkedList list              = DoubleLinkedList.Create(arrayForList);
            DoubleLinkedList expectedArrayList = DoubleLinkedList.Create(expectedArray);

            actual.AddDoubleLinkedListToStart(list);
            Assert.AreEqual(expectedArrayList, actual);
        }