public void StackPushTest() { var expected = new string[] { "my", "life", "is", "good" }; Stack_ <string> result = new Stack_ <string>(4); foreach (string item in expected) { result.push(item); } Assert.IsTrue(expected.SequenceEqual(result.GetAllStackElements())); }
public void StackPeepTest() { var array = new string[] { "my", "life", "is", "good" }; Stack_ <string> result = new Stack_ <string>(4); foreach (string item in array) { result.push(item); } string res = result.peep(2); string expected = "is"; Assert.AreEqual(expected, res); }