public void Test1(int value, bool expectedIsPrime) { var isPrime = Calc.isPrime(value); Assert.AreEqual(expectedIsPrime, isPrime); }
public void DoMinus(string value) { var result = Calc.Calculate(value); Assert.IsTrue(result.result == 1, $"{value} should be 1"); }
public void ShouldErrorOnCrap() { var result = Calc.Calculate(null); Assert.IsFalse(result.err.Length == 0, "should not be empty"); }
public void DoBODMAS(string value) { var result = Calc.Calculate(value); Assert.IsTrue(result.result == 10, $"{value} should be 10"); }
public void DoErrors(string value) { var result = Calc.Calculate(value); Assert.IsFalse(result.err.Length == 0, $"{value} should yield an error"); }
public void DoAddMultipy(string value) { var res = Calc.Calculate(value); Assert.IsTrue(res.result == 10, $"{value} should be 10"); }
public void PrecedenceOrder(string value) { var result = Calc.Calculate(value); Assert.IsTrue(result.result == -92, $"{value} should be -92"); }
public void DoPlus(string value) { var result = Calc.Calculate(value); Assert.IsTrue(result.result == 6, $"{value} should be 92"); }