public void StringExpressionChecker_OneDigit_ShouldPass() { // Arrange const string expression = "4"; // Act bool isValid = StringExpressionChecker.IsValid(expression); // Assert Assert.IsTrue(isValid); }
public void StringExpressionChecker_DivisionByZero_ShouldFail() { // Arrange const string expression = "4+4/0+2"; // Act bool isValid = StringExpressionChecker.IsValid(expression); // Assert Assert.IsFalse(isValid); }
public void StringExpressionChecker_TwoMathOperationsNextToEachOther_ShouldFail() { // Arrange const string expression = "4++4"; // Act bool isValid = StringExpressionChecker.IsValid(expression); // Assert Assert.IsFalse(isValid); }
public void StringExpressionChecker_LastIsMathOperation_ShouldFail() { // Arrange const string expression = "4+4+"; // Act bool isValid = StringExpressionChecker.IsValid(expression); // Assert Assert.IsFalse(isValid); }
public void StringExpressionChecker_CorrectExpression_ShouldPass() { // Arrange const string expression = "4+4/2"; // Act bool isValid = StringExpressionChecker.IsValid(expression); // Assert Assert.IsTrue(isValid); }