コード例 #1
0
        public void Initialize()
        {
            var mock = new Mock <ICalculationOperation>();

            mock.Setup(m => m.GetPriority("+")).Returns(2);
            mock.Setup(m => m.GetPriority("*")).Returns(3);
            _calculationOperation = new PostfixNotationParseEquation(mock.Object);
        }
コード例 #2
0
 public PostfixNotationExpression(ICalculationOperation calculationOperation, IPostfixNotationParseEquation postfixNotationParseEquation)
 {
     _postfixNotationParseEquation = postfixNotationParseEquation;
     _calculationOperation         = calculationOperation;
 }