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); }