public void ShouldIncreaseListLengthForInsert() { VectorClass<int> list = new VectorClass<int>(); list.Add(1); list.Add(2); list.Insert(1, 7); int result = list.IndexOf(7); Assert.AreEqual(1, result); }
public void ShouldInsertNewElementInList() { VectorClass<int> list = new VectorClass<int>(); list.Add(1); list.Add(2); list.Add(3); list.Insert(2, 7); int result = list.IndexOf(7); Assert.AreEqual(2, result); }
public void ShouldRemoveElementAtIndexOneInList() { VectorClass<int> list = new VectorClass<int>(); list.Add(1); list.Add(2); list.Add(3); list.Insert(2, 7); list.RemoveAt(1); int result = list.IndexOf(7); Assert.AreEqual(1, result); }
public void ShouldTestIEnumerable() { VectorClass<int> list = new VectorClass<int>(); list.Add(1); list.Add(2); list.Add(3); list.Insert(2, 7); list.Remove(2); IEnumerator<int> enumerator = list.GetEnumerator(); bool b = enumerator.MoveNext(); int result = enumerator.Current; Assert.AreEqual(1, result); }