public void SimpleIncreaseTest() { IStack stack = new ArrayStack(); StackCalculator calculator = new StackCalculator(stack); calculator.Push(10); calculator.Push(2); calculator.Increase(); Assert.AreEqual(20, calculator.Result()); }
public void SimpleDeductTest() { IStack stack = new ArrayStack(); StackCalculator calculator = new StackCalculator(stack); calculator.Push(10); calculator.Push(2); calculator.Deduct(); Assert.AreEqual(8, calculator.Result()); }
public void SimpleDivisionTest() { IStack stack = new Stack(); StackCalculator calculator = new StackCalculator(stack); calculator.Push(10); calculator.Push(2); calculator.Division(); Assert.AreEqual(5, calculator.Result()); }
public void SimpleAddTest() { IStack stack = new ArrayStack(); StackCalculator calculator = new StackCalculator(stack); calculator.Push(1); calculator.Push(2); calculator.Add(); Assert.AreEqual(3, calculator.Result()); }
public void StrongTest() { IStack stack = new Stack(); StackCalculator calculator = new StackCalculator(stack); calculator.Push(7); calculator.Push(8); calculator.Add(); calculator.Push(13); calculator.Deduct(); calculator.Push(2); calculator.Division(); Assert.AreEqual(1, calculator.Result()); }