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); }
public void Interpret_IncorrectTerm(string termText) { var termInterpreter = new TermInterpreter(); Assert.Throws <IncorrectTermException>(() => termInterpreter.Interpret(termText)); }