Esempio n. 1
0
        public void SimpleExpressionTest()
        {
            string styleValue = "expression(26 * 7)";

            HtmlStyleValueExpression expression = HtmlStyleParser.ParseValue(styleValue);

            Output(expression);
        }
Esempio n. 2
0
        public void DoubleParenthesesExpressionTest()
        {
            string styleValue = "expression((26 + 7) * 9)";

            HtmlStyleValueExpression expression = HtmlStyleParser.ParseValue(styleValue);

            Output(expression);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }