public int[] CheckAddElementToQueue(int[] array, int element) { var stack = new GenericStack <int>(array); stack.Push(element); return(stack.ToArray()); }
public void ToArray_ComparingStackInnerArrayToCopyOfThatArray_ReturnsTrue() { int[] expectedArray = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; for (int i = 0; i < 10; i++) { _intStack.Push(i); } Assert.AreEqual(expectedArray, _intStack.ToArray()); }