예제 #1
0
        public void PropertyValueWithFunction()
        {
            var parser = new CssSimpleValueParser();

            parser.SetContext("fn(1,2)");
            var arg = parser.DoParse();

            Assert.IsTrue(parser.End);
            Assert.AreEqual(0, parser.Errors.Count);
            Assert.IsTrue(arg.IsValid);
            Assert.AreEqual("fn(1,2)", arg.ToString());
        }
예제 #2
0
        public void WithSpaces()
        {
            var parser = new CssSimpleValueParser();

            parser.SetContext("x(abc, de fg )");
            var arg = parser.DoParse();

            Assert.IsTrue(parser.End);
            Assert.AreEqual(0, parser.Errors.Count);
            Assert.IsTrue(arg.IsValid);
            Assert.AreEqual(3, arg.Arguments.Count);
            Assert.AreEqual("x(abc,de fg)", arg.ToString());
        }