public void classes() { Document doc = NSoup.NSoupClient.Parse("<div><p class='mellow yellow'></p><p class='red green'></p>"); Elements els = doc.Select("p"); Assert.IsTrue(els.HasClass("red")); Assert.IsFalse(els.HasClass("blue")); els.AddClass("blue"); els.RemoveClass("yellow"); els.ToggleClass("mellow"); Assert.AreEqual("blue", els[0].ClassName()); Assert.AreEqual("red green blue mellow", els[1].ClassName()); }