public void SetUp()
 {
     _calculator = new Calculator();
     _validator = new Validator(-10, 10);
     _calcProxy = new CalcProxy(_validator, _calculator);
     _calcProxyWithLimits = new CalcProxy(new Validator(-10, 10), _calculator);
 }
Example #2
0
 public void SetUp()
 {
     _mathRegex = new MathRegex();
     _fixer = new ExpressionFixer();
     _lexer = new MathLexer(_fixer);
     _calculator = new Calculator();
     _calcProxy = new CalcProxy(new Validator(-100, 100),
                                    _calculator);
     _resolver = new Resolver(_lexer, new Precedence());
     _parser = new MathParser(_lexer, _resolver);
 }
 public void TestInitialize()
 {
     _calculator = new Calculator();
     _coordinator = new CalcProxy(new Validator(-100, 100), _calculator);
     _coordinatorWithLimits = new CalcProxy(new Validator(-10, 10), _calculator);
 }
Example #4
0
 public CalcProxy(Validator validador, Calculator calculator)
 {
     _validador = validador;
     _calculator = calculator;
 }