Exemple #1
0
 public void TestDivide()
 {
     MathsCalculator calculator = new MathsCalculator();
     decimal expected = 1;
     decimal actual = calculator.Divide(2, 0);
     Assert.AreEqual(expected, actual);
 }
Exemple #2
0
 public void TestSubtract()
 {
     MathsCalculator calculator = new MathsCalculator();
     decimal expected = 10;
     decimal actual = calculator.Subtract(20, 10);
     Assert.AreEqual(expected, actual);
 }
Exemple #3
0
 public void TestMultiply()
 {
     MathsCalculator calculator = new MathsCalculator();
     decimal expected = 10;
     decimal actual = calculator.Multiply(5, 2);
     Assert.AreEqual(expected, actual);
 }
Exemple #4
0
 public void TestAdd()
 {
     MathsCalculator calculator = new MathsCalculator();
     decimal expected = 10;
     decimal actual = calculator.Add(5, 5);
     Assert.AreEqual(expected, actual);
 }