private static void UnknownShouldBe(float?expected, string expression) { Assert.AreEqual(expected, EquationSolver.Main(expression)); }
public void LargeNumber() { Assert.Throws <OverflowException>(() => EquationSolver.Main("X + 66666666666666666666666666 = ( 3 + 2 ) / 5")); }
public void NumbersNotFound() { Assert.Throws <NumbersNotFoundException>(() => EquationSolver.Main("X = 2X")); }
public void UnknownNotFound() { Assert.Throws <UnknownNotFouldException>(() => EquationSolver.Main("4 + 2 = ( 3 + 2 ) / 0")); }
public void EqualsNotFound() { Assert.Throws <EqualsNotFoundException>(() => EquationSolver.Main("X + 2 ( 3 + 2 ) / 0")); }
public void DivideByZero() { Assert.Throws <DivideByZeroException>(() => EquationSolver.Main("X + 2 = 3 / 0")); }