public void PopOneTest() { PArray <int> pa = new PArray <int>(new List <int> { 1, 2, 3, 4 }); var i = pa.Pop(); Assert.AreEqual(3, pa.Count); Assert.AreEqual(4, i); }
public void UnshiftOneTest() { PArray <int> pa = new PArray <int>(new List <int> { 1, 2, 3, 4 }); pa.Unshift(5); Assert.AreEqual(5, pa.Count); int i = pa.Pop(); Assert.AreEqual(4, i); }