public void Est_Length_Is_Accurate()
 {
     var attribs = new HtmlAttributes();
     Assert.That(attribs.GetEstLength(), Is.EqualTo(0));
     attribs["Attrib1"] = "1Value";
     Assert.That(attribs.GetEstLength(), Is.EqualTo(16));
     attribs["Attrib2"] = "2Value-Changed";
     Assert.That(attribs.GetEstLength(), Is.EqualTo(40));
     attribs["Attrib3-Changed"] = "3Val";
     Assert.That(attribs.GetEstLength(), Is.EqualTo(62));
     attribs["Attrib1"] = null;
     Assert.That(attribs.GetEstLength(), Is.EqualTo(46));
     attribs["Attrib2"] = "2Value-Changed-more";
     Assert.That(attribs.GetEstLength(), Is.EqualTo(51));
 }
 public void Removing_An_Item_Doesnot_Break_Est()
 {
     var attribs = new HtmlAttributes();
     attribs["Attrib1"] = "1Value";
     attribs["Attrib2"] = "2Value-Changed";
     attribs["Attrib3-Changed"] = "3Val";
     Assert.That(attribs.GetEstLength(), Is.EqualTo(62));
     attribs.Remove("Attrib1");
     Assert.That(attribs.GetEstLength(), Is.EqualTo(46));
     attribs["Attrib1"] = "1Value";
     attribs.Remove(new KeyValuePair<string, string>("Attrib2", "2Value-Changed"));
     Assert.That(attribs.GetEstLength(), Is.EqualTo(38));
 }