Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public void GetByIndexTest(int[] array, int index, int expected)
        {
            DoubleLList DlinkedList = new DoubleLList(array);

            int actual = DlinkedList[index];

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        public void DeleteByFirstTest(int[] array, int[] expArray)
        {
            DoubleLList expected = new DoubleLList(expArray);
            DoubleLList actual   = new DoubleLList(array);

            actual.DeleteByFirst();
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 7
0
        public void ReverseTest(int[] array, int[] expArray)
        {
            DoubleLList expected = new DoubleLList(expArray);
            DoubleLList actual   = new DoubleLList(array);

            actual.Reverse();
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 10
0
        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);
        }
Exemplo n.º 11
0
        public void GetIndexMinTest(int[] array, int expected)
        {
            DoubleLList actual = new DoubleLList(array);

            Assert.AreEqual(expected, actual.GetIndexMin());
        }
Exemplo n.º 12
0
        public void IndexByValueIndexTest(int[] array, int value, int expected)
        {
            DoubleLList actual = new DoubleLList(array);

            Assert.AreEqual(expected, actual.IndexByValue(value));
        }
Exemplo n.º 13
0
        public void GetMaxValueTest(int[] array, int expected)
        {
            DoubleLList actual = new DoubleLList(array);

            Assert.AreEqual(expected, actual.GetMaxValue());
        }