public void DivisionBadTest() { IStack stack = new Stack(); StackCalculator calculator = new StackCalculator(stack); calculator.Push(10); calculator.Push(0); calculator.Division(); }
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 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()); }