public void SimpleExpressionTest() { string styleValue = "expression(26 * 7)"; HtmlStyleValueExpression expression = HtmlStyleParser.ParseValue(styleValue); Output(expression); }
public void DoubleParenthesesExpressionTest() { string styleValue = "expression((26 + 7) * 9)"; HtmlStyleValueExpression expression = HtmlStyleParser.ParseValue(styleValue); Output(expression); }
public void OneStyleTest() { string style = "color:red"; HtmlStyleAttributeCollection result = HtmlStyleParser.Parse(style); Output(result); Console.WriteLine(result.Join()); Assert.AreEqual(1, result.Count); Assert.AreEqual("red", result["color"].Value); }
public void TwoStyleWithoutLastValueTest() { string style = " color: red; font-weight"; HtmlStyleAttributeCollection result = HtmlStyleParser.Parse(style); Output(result); Console.WriteLine(result.Join()); Assert.AreEqual(2, result.Count); Assert.AreEqual("red", result["color"].Value); Assert.AreEqual(null, result["font-weight"].Value); }