public void AddLastTest(int[] a, int[] ex) { ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(); al.AddLast(a); int[] actual = al.ToArray(); Assert.AreEqual(ex, actual); }
public void AddAtTest(int a, int[] b, int[] ex) { int[] array = new int[] { 2, 2, 2, 5, 8 }; ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(array); al.AddAt(a, b); int[] actual = al.ToArray(); Assert.AreEqual(ex, actual); }
public void AddFirstTest(int[] a, int[] ex) { int[] array = new int[] { 2, 2, 2 }; ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(array); al.AddFirst(a); int[] actual = al.ToArray(); Assert.AreEqual(ex, actual); }
public void IndexOfMinTest(int ex) { int[] array = new int[] { 2, 2, 2, 5, 8 }; ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(array); int actual = al.IndexOfMin(); Assert.AreEqual(ex, actual); }
public void SortDescTest(int[] ex) { int[] array = new int[] { 6, 7, 8, 1, 2 }; ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(array); al.SortDesc(); int[] actual = al.ToArray(); Assert.AreEqual(ex, actual); }
public void GetTest(int a, int ex) { int[] array = new int[] { 2, 2, 2, 5, 8 }; ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(array); int actual = al.Get(a); Assert.AreEqual(ex, actual); }
public void ContainsTest(int a, bool ex) { int[] array = new int[] { 2, 2, 2, 5, 8 }; ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(array); bool actual = al.Contains(a); Assert.AreEqual(ex, actual); }
public void RemoveAllTest(int a, int[] ex) { int[] array = new int[] { 1, 2, 2, 2, 5, 8, 5, 2 }; ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(array); al.RemoveAll(a); int[] actual = al.ToArray(); Assert.AreEqual(ex, actual); }
public void RemoveLastTest(int[] ex) { int[] array = new int[] { 2, 2, 2, 5, 8 }; ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(array); al.RemoveLast(); int[] actual = al.ToArray(); Assert.AreEqual(ex, actual); }
public void ReverseTest(int[] array, int[] ex) { ArrayListProject.ArrayList al = new ArrayListProject.ArrayList(array); int[] actual = al.Reverse(); Assert.AreEqual(ex, actual); }