public void Setup()
 {
     calculator = new Calculator();
 }
 public void OneTimeSetUp()
 {
     calc = new Calculator();
 }
示例#3
0
        public void ModuloIsCorrect(int a, int b, int expected)
        {
            int actual = Calculator.Modulo(a, b);

            Assert.AreEqual(expected, actual);
        }
示例#4
0
        public void AddIsCorrect(int a, int b, int expected)
        {
            int actual = Calculator.Add(a, b);

            Assert.AreEqual(expected, actual);
        }
示例#5
0
        public void DivideIsCorrect(int a, int b, int expected)
        {
            int actual = Calculator.Divide(a, b);

            Assert.AreEqual(expected, actual);
        }
示例#6
0
 public void DivideByZeroCheck(int a, int b)
 {
     Assert.Throws <Exception>(() => Calculator.Divide(a, b));
 }
示例#7
0
 public void MultiplyBoundaryCheck(int a, int b)
 {
     Assert.Throws <Exception>(() => Calculator.Multiply(a, b));
 }
示例#8
0
        public void MultiplyIsCorrect(int a, int b, int expected)
        {
            int actual = Calculator.Multiply(a, b);

            Assert.AreEqual(expected, actual);
        }
示例#9
0
 public void SubtractBoundaryCheck(int a, int b)
 {
     Assert.Throws <Exception>(() => Calculator.Subtract(a, b));
 }
示例#10
0
        public void SubtractIsCorrect(int a, int b, int expected)
        {
            int actual = Calculator.Subtract(a, b);

            Assert.AreEqual(expected, actual);
        }
示例#11
0
 public void AddBoundaryCheck(int a, int b)
 {
     Assert.Throws <Exception>(() => Calculator.Add(a, b));
 }