public void AddByIndexNegativTests(int[] array, int index, int value, int[] expArray) { DoubleLList expected = new DoubleLList(expArray); DoubleLList actual = new DoubleLList(array); Assert.Throws <IndexOutOfRangeException>(() => actual.AddByIndex(index, value)); }
public void GetByIndexTest(int[] array, int index, int expected) { DoubleLList DlinkedList = new DoubleLList(array); int actual = DlinkedList[index]; Assert.AreEqual(expected, actual); }
public void DeleteByIndexTest(int[] array, int index, int[] expected) { DoubleLList Expect = new DoubleLList(expected); DoubleLList actual = new DoubleLList(array); actual.DeleteByIndex(index); Assert.AreEqual(Expect, actual); }
public void AddTest(int[] array, int value, int[] expected) { DoubleLList Expect = new DoubleLList(expected); DoubleLList actual = new DoubleLList(array); actual.Add(value); Assert.AreEqual(Expect, actual); }
public void DeleteAllByValueTest(int[] array, int value, int[] expArray) { DoubleLList expected = new DoubleLList(expArray); DoubleLList actual = new DoubleLList(array); actual.DeleteAllByValue(value); Assert.AreEqual(expected, actual); }
public void DeleteByFirstTest(int[] array, int[] expArray) { DoubleLList expected = new DoubleLList(expArray); DoubleLList actual = new DoubleLList(array); actual.DeleteByFirst(); Assert.AreEqual(expected, actual); }
public void ReverseTest(int[] array, int[] expArray) { DoubleLList expected = new DoubleLList(expArray); DoubleLList actual = new DoubleLList(array); actual.Reverse(); Assert.AreEqual(expected, actual); }
public void DeleteByIndexNElementTest(int[] array, int index, int size, int[] expArray) { DoubleLList expected = new DoubleLList(expArray); DoubleLList actual = new DoubleLList(array); actual.DeleteByIndexNElement(index, size); Assert.AreEqual(expected, actual); }
public void AddByIndexArrayTest(int[] array, int index, int[] value, int[] expArray) { DoubleLList expected = new DoubleLList(expArray); DoubleLList actual = new DoubleLList(array); actual.AddByIndexArray(index, value); Assert.AreEqual(expected, actual); }
public void SetByIndexTest(int[] array, int index, int value, int[] expArray) { DoubleLList expected = new DoubleLList(expArray); DoubleLList actual = new DoubleLList(array); actual[index] = value; Assert.AreEqual(expected, actual); }
public void GetIndexMinTest(int[] array, int expected) { DoubleLList actual = new DoubleLList(array); Assert.AreEqual(expected, actual.GetIndexMin()); }
public void IndexByValueIndexTest(int[] array, int value, int expected) { DoubleLList actual = new DoubleLList(array); Assert.AreEqual(expected, actual.IndexByValue(value)); }
public void GetMaxValueTest(int[] array, int expected) { DoubleLList actual = new DoubleLList(array); Assert.AreEqual(expected, actual.GetMaxValue()); }