public void NoBracketsCauseException() { var expression = "$competitor1"; string @operator; string operand; NameExpressionHelper.ParseExpression(expression, out @operator, out operand); }
public void ExpressionWithMinusOperatorIsParsed() { var expression = "{-corners}"; string @operator; string operand; NameExpressionHelper.ParseExpression(expression, out @operator, out operand); Assert.AreEqual("-", @operator, "Value of operator is not correct"); Assert.AreEqual("corners", operand, "Value of operator is not correct"); }
public void ExpressionWithPlusOperatorIsParsed() { var expression = "{+score}"; string @operator; string operand; NameExpressionHelper.ParseExpression(expression, out @operator, out operand); Assert.AreEqual("+", @operator, "Value of operator is not correct"); Assert.AreEqual("score", operand, "Value of operator is not correct"); }
public void ExpressionWithOrdinalOperatorIsParsed() { var expression = "{!periodNumber}"; string @operator; string operand; NameExpressionHelper.ParseExpression(expression, out @operator, out operand); Assert.AreEqual("!", @operator, "Value of operator is not correct"); Assert.AreEqual("periodNumber", operand, "Value of operator is not correct"); }
public void ExpressionWithNoOperatorIsParsed() { var expression = "{reply_nr}"; string @operator; string operand; NameExpressionHelper.ParseExpression(expression, out @operator, out operand); Assert.IsNull(@operator, "Value of operator is not correct"); Assert.AreEqual("reply_nr", operand, "Value of operator is not correct"); }
public void ExpressionWithPlayerProfileOperatorIsParse() { var expression = "{%player}"; string @operator; string operand; NameExpressionHelper.ParseExpression(expression, out @operator, out operand); Assert.AreEqual("%", @operator, "Value of the operator is not correct"); Assert.AreEqual("player", operand, "Value of operand is not correct"); }
public void ExpressionWithEntityNameOperatorIsParsed() { var expression = "{$competitor1}"; string @operator; string operand; NameExpressionHelper.ParseExpression(expression, out @operator, out operand); Assert.AreEqual("$", @operator, "Value of operator is not correct"); Assert.AreEqual("competitor1", operand, "Value of operator is not correct"); }