public void ShouldPushRange_WithIList() { Data.Structures.Stack <int> stack = new Data.Structures.Stack <int>(); int[] elements = new int[] { 1, 2, 3, 4, 5 }; stack.PushRange(elements); Assert.AreEqual(elements.Length, stack.Count); }
public void ShouldGetTopElement() { Data.Structures.Stack <int> stack = new Data.Structures.Stack <int>(); int[] elements = new int[] { 1, 2, 3, 4, 5 }; stack.PushRange(elements); Assert.AreEqual(5, stack.Top); }
public void ShouldPushRange_WithIEnumerable() { Data.Structures.Stack <int> stack = new Data.Structures.Stack <int>(); IEnumerable <int> elements = new List <int>() { 1, 2, 3, 4, 5 }; stack.PushRange(elements); Assert.AreEqual(elements.Count(), stack.Count); }