public void DivideTwoIntegers() { var calc = new CalculatorInstance(); var num1 = 5; var num2 = 3; var result = num1 / num2; Assert.AreEqual(result, calc.Divide(num1, num2)); }
public void DivideIntegerByZero() { var calc = new CalculatorInstance(); var num1 = 5; var num2 = 0; var result = calc.Divide(num1, num2); Assert.Fail("Divided by zero! {0}", result); }
public void DivideTwoDoubles() { var calc = new CalculatorInstance(); var num1 = 5.8; var num2 = 3.0; var result = num1 / num2; Assert.AreEqual(result, calc.Divide(num1, num2)); }
public void MultiplyTwoNumbers() { var calc = new CalculatorInstance(); var num1 = 5.8; var num2 = 3.0; var result = num1 * num2; Assert.AreEqual(result, calc.Multiply(num1, num2)); }
public void SubstractTwoNumbers() { var calc = new CalculatorInstance(); var num1 = 5.8; var num2 = 3.0; var result = num1 - num2; Assert.AreEqual(result, calc.Subtract(num1, num2)); }
public void AddTwoNumbers() { var calc = new CalculatorInstance(); var num1 = 5.8; var num2 = 3.0; var result = num1 + num2; Assert.AreEqual(result, calc.Add(num1, num2)); }
public void MakeACalculatorInstance() { var calc = new CalculatorInstance(); Assert.IsNotNull(calc, "There was not made a calculator intance"); }