public void ValidateExpressionTests(string expression, bool expectedResult, string expectedError) { var subExpression = new SubExpression(); bool result = subExpression.ValidateExpression(expression, out string error); Assert.That(result, Is.EqualTo(expectedResult)); Assert.That(error, Is.EqualTo(expectedError)); }