Example #1
0
        public void MultiplicationTest(int a, int b)
        {
            var actual   = ArithmeticWithPlus.Multiply(a, b);
            var expected = a * b;

            Assert.Equal(expected, actual);
        }
Example #2
0
        public void SubstractionTest(int a, int b)
        {
            var actual   = ArithmeticWithPlus.Substract(a, b);
            var expected = a - b;

            Assert.Equal(expected, actual);
        }
Example #3
0
 public void DivisionTest(int a, int b)
 {
     if (b == 0)
     {
         Assert.Throws <InvalidOperationException>(() => ArithmeticWithPlus.Divide(a, b));
     }
     else
     {
         var actual   = ArithmeticWithPlus.Divide(a, b);
         var expected = a / b;
         Assert.Equal(expected, actual);
     }
 }