public void MinusCalcTest(double first, double second, double expected) { var calc = new MinusCalc(); double result = calc.Calculate(first, second); Assert.AreEqual(expected, result); }
public SuperCalc CreateCalc(string strCalcType) { SuperCalc InnerCalc = null; switch (strCalcType) { case "+": InnerCalc = new AddCalc(); break; case "-": InnerCalc = new MinusCalc(); break; case "*": InnerCalc = new MultiCalc(); break; case "/": InnerCalc = new DiviCalc(); break; default: break; } return(InnerCalc); }