public void CalculateTestMethod1() { stackCalc.Calculate("1"); Assert.AreEqual(1, stackCalc.Calculate("1")); Assert.AreEqual(2, stackCalc.Calculate("1 1 +")); }
public void CalculateTooLongExpressionTest() { stackCalc = new StackCalc(new ArrayList()); string expression = ""; for (int i = 0; i < 1001; ++i) { expression += "1 "; } for (int i = 0; i < 1000; ++i) { expression += "+ "; } stackCalc.Calculate(expression); }