public void SubstractIntegracion() { var validator = new LimitsValidator(-100, 100); var calculator = new Calculator(); var proxy = new CalculatorProxy(validator); var result = proxy.BinaryOperation(calculator.Substract, 5, 3); Assert.AreEqual(2, result); }
public void SetUp() { var expressionValidator = new MathRegex(); var expressionFixer = new ExpressionFixer(expressionValidator); this.lexer = new MathLexer(expressionValidator, expressionFixer); var limitsValidator = new LimitsValidator(-100, 100); var proxy = new CalculatorProxy(limitsValidator); var calculator = new Calculator(); var operatorFactory = new OperatorFactory(proxy, calculator); this.parser = new MathParser(this.lexer, operatorFactory); }
public void SetUp() { calculator = new Calculator(); }