public void Configurer_Test() { var configurer = new TestConfigurer(); ICalculator calculator = new CalculatorFactory(configurer).createInstance(); double result = calculator.Compute("~3.3"); Assert.AreEqual(3d, result); result = calculator.Compute("~3.3+2.8"); Assert.AreEqual(5.8d, result); result = calculator.Compute("3.3+2.8~"); Assert.AreEqual(4.1d, result); result = calculator.Compute("3.3+2.8~*2"); Assert.AreEqual(4.9d, result, 0.00001); }