public void GetEnumerator_EnumeratesAllElements() { var enumerator = _three.GetEnumerator(); var elements = new List <int>(); while (enumerator.MoveNext()) { elements.Add(enumerator.Current); } TestHelper.AssertSequence(elements, 3, 2, 1); }
public void GetEnumerator_MoveNext_ReturnsFalse_ForEmptyHeap() { var enumerator = _empty.GetEnumerator(); Assert.IsFalse(enumerator.MoveNext()); }