Esempio n. 1
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 SetUp()
 {
     _expressionValidator = new MathRegex();
     _fixer = new ExpressionFixer();
     _lexer = new MathLexer(_fixer);
     _calculator = new Calculator();
     _validator = new Validator(-20, 20);
     _calcProxy = new CalcProxy(_validator, _calculator);
 }
 public void SetUp()
 {
     _calculator = new Calculator();
     _validator = new Validator(-20, 20);
     _calcProxy = new CalcProxy(_validator, _calculator);
     _expressionValidator = new MathRegex();
     _fixer = new ExpressionFixer();
     _lexer = new MathLexer(_fixer);
     _precedence = new Precedence();
     _resolver = new Resolver(_lexer, _calcProxy, _precedence);
     _parser = new MathParser(_lexer, _expressionValidator, _resolver);
 }