public void GetEnumerator_GetEnumeratorForArrayList_EnumeratorNotEqualNull() { //arrenge MyArrayList <int> array = new MyArrayList <int>(new int[3] { 1, 2, 3 }); //act var enumerator = array.GetEnumerator(); //assert Assert.NotNull(enumerator); }
public void testEnumerator() { var l = new MyArrayList<string>(); l.add("i'll be back"); l.add("i'm gona fail mother f****r"); var enumerator = l.GetEnumerator(); Assert.IsTrue(enumerator.MoveNext()); Assert.AreEqual(enumerator.Current, "i'll be back"); Assert.IsTrue(enumerator.MoveNext()); Assert.AreEqual(enumerator.Current, "i'm gona fail mother f****r"); Assert.IsFalse(enumerator.MoveNext()); }
public void GetEnumeratorTest() { Assert.AreEqual(list, list.GetEnumerator()); }