public void Test_Not_Empty() { var stack = new Stack2(); stack.Push(1); Assert.AreEqual(false, stack.Empty()); }
/** * Outputs the stack as the sequence of elements separated * by '.'. * @return the stack as the sequence of elements separated by '.' */ protected String PrintStack() { if (stack.Empty()) return ""; StringBuilder s = new StringBuilder(); foreach (String part in stack) s.Append('.').Append(part); return s.ToString(1, s.Length - 1); }
/** * Outputs the stack as the sequence of elements separated * by '.'. * @return the stack as the sequence of elements separated by '.' */ virtual protected String PrintStack() { if (stack.Empty()) { return(""); } StringBuilder s = new StringBuilder(); foreach (String part in stack) { s.Append('.').Append(part); } return(s.ToString(1, s.Length - 1)); }
public void Test_Empty() { var stack = new Stack2(); Assert.AreEqual(true, stack.Empty()); }