示例#1
0
        public void Interpret(string termText, decimal expectedMultiplier, string expectedVariable, int expectedPower)
        {
            var termInterpreter = new TermInterpreter();
            var result          = termInterpreter.Interpret(termText);

            Assert.Equal(expectedMultiplier, result.Multiplier);
            Assert.Equal(expectedVariable, result.Variable);
            Assert.Equal(expectedPower, result.Power);
        }
示例#2
0
        public void Interpret_IncorrectTerm(string termText)
        {
            var termInterpreter = new TermInterpreter();

            Assert.Throws <IncorrectTermException>(() => termInterpreter.Interpret(termText));
        }