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